def solve(n) return 0 if n < 2 ans = n-1 num = n (1..([(n-1)/2,4000].min)).each do |i| ans -= 2 if (num).odd? num*=n-i num/=i+1 end ans end while cin = gets p solve(cin.to_i) end