let m=1000000open Array;;let a,b=make m 1,make m 0;;a.(0)<-0;;let rec($)i j=if i*j<m then(a.(i*j)<-0;i$(j+1))and g i=if i<m then(if a.(i)=1then i$2;b.(i)<-b.(i-1)+a.(i);g(i+1))in g 2;;let rec f()=f(Printf.printf"%d
"b.(read_int()));;try f()with _->()