\begin{problem}{Invariant Polynomials}{invar.in}{invar.out}{2 seconds}

Consider a real polynomial $P(x, y)$ in two variables. It is called 
{\em invariant\/} with respect to the rotation by an angle $\alpha$ if
$$P(x\cos\alpha-y\sin\alpha,x\sin\alpha+y\cos\alpha)=P(x, y)$$ for all
real $x$ and $y$.

Let's consider the real vector space formed by all polynomials in two
variables of degree not greater than $d$ invariant with respect to the
rotation by $2\pi/n$. Your task is to calculate the dimension of this
vector space.

You might find useful the following remark: 
Any polynomial of degree not greater than $d$ can be uniquely
written in form $$P(x, y)=\sum_{i,j\ge 0\atop i+j\le d} a_{ij} x^iy^j$$
for some real coefficients $a_{ij}$.

\InputFile

The input file contains two 
positive integers $d$ and $n$ separated by one space.
It is guaranteed that they are less than one thousand.

\OutputFile

Output a single integer $M$ which is the dimension of the vector space described.

\Example

\begin{example}
\exmp{1 1}{3}\exmp{2 2}{4}
\end{example}

\end{problem}
