#include <bits/stdc++.h>
using namespace std;
long long int full = 0;
long long int arr[51][51];
long long int n, t;
void solve(long long int i, long long int j, long long int level) {
  if (level > n - 1) {
    return;
  } else {
    if (arr[i][j] < (1ll << level)) {
      arr[i][j]++;
      if (arr[i][j] == (1ll << level)) {
        full++;
      }
    } else {
      solve(i + 1, j + 1, level + 1);
      solve(i + 1, j, level + 1);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> t;
  for (long long int i = 0; i < 10ll; i++) {
    for (long long int j = 0; j < 10ll; j++) {
      arr[i][j] = 0;
    }
  }
  for (long long int i = 1; i <= t; i++) {
    solve(0, 0, 0);
  }
  cout << full << endl;
}
