#P1646E. Power Board
Power Board
Description
You have a rectangular board of size ( rows, columns). The rows are numbered from to from top to bottom, and the columns are numbered from to from left to right.
The cell at the intersection of row and column contains the number ( raised to the power of ). For example, if and the board is as follows:
Find the number of distinct integers written on the board.
The only line contains two integers and () — the number of rows and columns of the board.
Print one integer, the number of distinct integers on the board.
Input
The only line contains two integers and () — the number of rows and columns of the board.
Output
Print one integer, the number of distinct integers on the board.
Samples
Note
The statement shows the board for the first test case. In this case there are distinct integers: , , , , , , and .
In the second test case, the board is as follows:
There are distinct numbers: , , , and .
In the third test case, the board is as follows:
There are distinct numbers: , , , , and .