3000.times{c:stdin.get_u8;r:0;8.times{r=2*r|c&1;c/=2;}stdout.put_u8(r);}