Add a number to a parameter

I'm doing slides with beamer using the mtheme. This theme includes the slide number in the bottom of the page using this code:

\begin{beamercolorbox}[wd=\textwidth,ht=3ex,dp=3ex,leftskip=0.3cm,rightskip=0.3cm]{structure}%
\end{beamercolorbox}%
}


I wanted to the number to appear as x/X, being X the total number of slides, which can be displayed via \inserttotalframenumber. So i change the third line above to:

\insertframenumber/\inserttotalframenumber%


Now, the problem is that I have a slide at the end that should NOT count in the total number of frames, and so the result is that it's showing x/X, begin X one unit bigger than it should.

How could I do it so it displays \inserttotaframenumber-1. I saw calc allows for simple calculations but using the package and writing just \insertotalframenumber-1 does not work.

Can I do this some how?

Thank you.

You can use a counter:

\newcounter{mynumber}

• It's displaying a 0. And why do you use \themynumber instead of \mynumber? Jun 25, 2015 at 9:25
• The 0 should be ok, if you have 1 frame. Keep in mind to compile twice!
• @MyUserIsThis: \the<counter> is the normal way to access the value of a counter.