Time

13:00:57
23 May 2012
Version for print

Anfisa and the flowers

prb63

   Murzik made one of flowerbeds as a chess-board with the sizes M to N. Some flower grows in every cell of flowerbeds. Sometimes he took out Anfisa for a walk on this flowerbed (yes, not surprised, they are really friends). Anfisa moves on a flowerbed such as: she beginning always from an overhead left corner to right inferior corner. She picks flowers thus each time to pass on a new route, and Murzyk give her the piece of cheese on the exit.

   You have to count up what most quantity of the pieces of cheese will have Anfisa, if she all the time will try to save most of flowers.


Specifications

   Input

   There is 2 numbers M and N in the unique line. Absence is between them.

   0 < M,N2000000000.  

   Output

   There is one number. It is a most quantity of the pieces of cheese, which Anfisa can get.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 10
Complexity: 21% 498/628
Classes: Line program, Simple mathematics

Example

Example input

2 3

Example output

3


← The Factorial Problems The Timetable from "Diez-Product" →