#include <stdio.h>
int combination(int n, int r)
{
    if (r == 0 || r == n)
        return (1);
    else if (r == 1)
        return (n);
    return (combination(n - 1, r - 1) + combination(n - 1, r));
}

int main() {
  int i,j;
  int ans = 0;
  scanf("%d%d" , &i , &j);

 for(int x=j;x<i+1;x++){
   ans += combination(i+1,x);
 }

if(ans>0){
  printf("%d\n",ans);
}else{
  printf("1");
}
  return 0;
}
