https://codeforces.com/contest/507/problem/C
Input Format
Check Link
Output Format
Check Link
Constraints
Check Link
Example
Input
2 3
Output
2
https://codeforces.com/contest/507/problem/C
Check Link
Check Link
Check Link
2 3
2