import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] ss = s.split("\\.");
        int a = Integer.parseInt(ss[0]);
        int b = Integer.parseInt(ss[1]);
        if((a == 10) || (a == 172 && (b >= 16 && b <= 32)) || (a == 192 && b == 168)){
            System.out.println(1);
        }else{
            System.out.println(0);
        }
    }
}