import java.util.*;interface A{static void main(){int x=0,i=0;for(Scanner s=new Scanner(System.in);x<100;)if((i=s.nextInt())==1||i==12||i==20)System.out.print(1);else x++;}}