import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); long k=sc.nextLong(); long[] a=new long[n]; for(int i=0;i target = new HashSet(); for (long i = 0; i < 1 << n; i++) { long sum=0; long cnt=0; long pro=1; for (int j = 0; j < n; j++) { if ((1 & i >> j) == 1) { sum+=a[j]; cnt+=1; pro*=a[j]; } } if(cnt>=k){ target.add(sum); target.add(pro); } } System.out.println((target.size())); sc.close(); } }