import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int k = Integer.parseInt(sc.next()); int count = 0; long temp = (long)Math.pow(2, k); long i = 1; while(temp * i <= Math.pow(2, n)) { count++; i++; } System.out.println(count); } }