import java.util.*;interface A{static void main(String[]s){ int c=0; for(Scanner s=new Scanner(System.in);c<99;)if(s.nextInt()%8%3<2)System.out.print("1");else c++; } }