let rec f x y m=if y=0then 1else let z=f(x*x mod m)(y/2)m in if y mod 2=1then x*z mod m else z and p n=if n==2then true else if n<2||n mod 2=0then false else if f 2(n-1)n=1then true else false and($)i a=if i=0then Printf.printf"%d
"a else(i-1)$(if p(read_int())then a+1else a);;(read_int())$0