#include <bits/stdc++.h>
using namespace std;
int glass[20][20];
int main() {
  int n, T;
  cin >> n >> T;
  for (long long t = 0; t < (T); ++t) {
    glass[0][0] += 1;
    for (long long i = 0; i < (10); ++i) {
      for (long long j = 0; j < (i + 1); ++j) {
        if (glass[i][j] >= (1 << i)) {
          int f = glass[i][j] - (1 << i);
          glass[i][j] = 1 << i;
          glass[i + 1][j] += f;
          glass[i + 1][j + 1] += f;
        }
      }
    }
  }
  int ans = 0;
  for (long long i = 0; i < (10); ++i)
    for (long long j = 0; j < (i + 1); ++j) {
      if (i >= n) continue;
      if (glass[i][j] >= (1 << i)) ans += 1;
    }
  cout << ans << endl;
  return 0;
}
