import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int d1 = sc.nextInt(); int d2 = sc.nextInt(); sc.close(); if (d1 > d2) { System.out.println(0); } else if (d1 == d2) { System.out.println(4); } else { System.out.println(8); } } }