a;main(i){for(;scanf("%b ",&i);putchar(48+!i))for(;i>0;i-=++a);}