Execution time limit is 1 second Runtime memory usage limit is 128 megabytes Find the value of the function
f(x,y)=⎩⎨⎧0,x≤0 or y≤0f(x−1,y−2)+f(x−2,y−1)+2,x≤yf(x−2,y−2)+1,x>y Input
Two integers x,y (0≤x,y≤50).
Output
Print the value of the function f(x,y).
Examples