Once spring comes bees go out and work. In an area full of flowers you can find a lot of bees. The flower area has a rectangular shape, with length n and width m. In order to know the position of the flowers the area has a coordinate system with its origin point in the lower left corner. We can find a flower in every point of the area that has positive integer coordinates. A bee works by traveling a single route through m+n+1 flowers, having coordinates (x0, y0), (x1, y1), …, (xm+n, ym+n), with the property that xi+1+ yi+1= xi+ yi+1, 0<=i<=m+n-1. Any two bees use different routes but there may be flowers through which more than one bee go through.
Task
Determine the number of bees that are working.
Input Data
Input file
albine.in contains on the first
line two positive integers m
and n separated by a space.
Output Data
Output file
albine.out will contain a single
line with the number of bees working on the area written on it.
Constraints
albine.in | albine.out | Explanation |
1 2 |
4 |
For the example data we have: Routes are OBAC, OBDC, OEDC, OEAC. |
Time limit: 0.1 seconds/test
prof. Doru Popescu Anastasiu
"Radu Greceanu" Slatina National High School
Contact:dopopan@yahoo.com