(S=System).in.any{b->8.times{b=2*b|b>>it*2&1};S.out.out.out.write b}