for(a=new java.util.Scanner(java.lang.System.in);q=a.nextLine();print(+!(Math.sqrt(("0b"+q)*8+1)%1)));