using System;class _{static void Main(){for(int i=0;i++<50;Console.Write(Math.Sqrt(1+8*Convert.ToByte(Console.ReadLine(),2))%1>0?0:1));}}