#include<stdio.h>
float fact (float x){
  float p = 1;
  for (float i = x; i > 1; i--){
    p = p*i;
  }
  return(p);
}
float comb ( float n,float r){
  float p = 0;
  p = ( fact(n)/( fact(n-r) * fact(r) ));
  return(p);
}
int main(){
  float n ,r ;
  float sum = 0;
  scanf("%f %f",&n,&r);
  for (float i = r ; i <= n ; i++){
    sum = sum + comb (n , i);
  }
  printf("%f", sum);
  return(0);
}

  