Paths on a Grid

No attempts yetTime limit1sMemory limit128 MB

Problem

Imagine you are attending your math lesson at school. Once again you are bored, because your teacher is explaining something you mastered years ago (this time it is $(a+b)^2 = a^2 + 2ab + b^2$). So you decide to pass the time by drawing modern art instead.

Fortunately you have a piece of squared paper, and you choose a rectangle of size $n \times m$ on it. Call this rectangle, together with the grid lines it contains, a grid. Starting at the lower-left corner of the grid, you move your pencil to the upper-right corner, keeping it on the lines and moving only to the right or up. The trail your pencil leaves is one work of art.

Repeating the procedure gives you another work of art. Now you wonder: how many different works of art can you produce? In other words, how many such paths are there?

Input

The input contains several test cases. Each test case consists of two unsigned 32-bit integers $n$ and $m$, the dimensions of the rectangle. Note that the corresponding grid has one more line than the rectangle in each dimension. The input is terminated by a line with $n = m = 0$, which is not processed.

Output

For each test case, print on its own line the number of different works of art that can be produced by the procedure described above; that is, the number of paths on the grid where every step moves one unit to the right or one unit up. You may safely assume that this number fits into a 32-bit unsigned integer.