You are given the following two functions. (N_0 denotes the set of non-negative integers.)
f(x)=⎩⎨⎧0, x−2k,,(k∈N_0) −x+2(k+1) , (k∈N_0)\mboxifx<0\mboxif2k≤x<2k+1\mboxif2k+1≤x<2k+2
g(x) =ax
How many intersections between the graphs of y=f(x) and y=g(x) exist on the XY-plane?
The first and only line of the input contains a single integer a.
Print the number of intersections between the graphs of y=f(x) and y=g(x). If there are infinitely many intersections, print INF.