#include <bits/stdc++.h>
uint16_t C[10][10 + 1];
void flow(int i, int j, uint16_t c) {
  if (i >= 10) {
    return;
  }
  if (C[i][j] == (1 << 10)) {
    flow(i + 1, j, c >> 1);
    flow(i + 1, j + 1, c >> 1);
  } else {
    C[i][j] += c;
  }
}
int main() {
  int n, t;
  std::cin >> n >> t;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= i; j++) {
      C[i][j] = 0;
    }
  }
  while (t--) {
    flow(0, 0, (1 << 10));
  }
  int r = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= n; j++) {
      if (C[i][j] == (1 << 10)) {
        r++;
      }
    }
  }
  std::cout << r << "\n";
  return 0;
}
