#include #include #include #include #include using namespace std; int n,m; long long find(int a, int b) { if(a == 1 && b == 1) return 0L; long long ans = 1; long long temp = 0; if(a > b) { temp += find(a/2,b); ans += 2*temp; if(a%2 != 0) ans += b; } else { temp += find(a,b/2); ans += 2*temp; if(b%2 != 0) ans += a; } return ans; } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ cin>>n>>m; cout<