using C=System.Console;class M{static void Main(){for(int b,i=0;;i^=b&1%b)if((b=~C.Read())>-12)C.WriteLine(i^(i=1));}}