#include <bits/stdc++.h>
using namespace std;
inline vector<string> __split(const string& s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.emplace_back(x);
  return move(v);
}
inline void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
inline void err(vector<string>::iterator it, T a, Args... args) {
  auto item = it->substr((*it)[0] == ' ', it->length());
  cerr << item << ": " << a << '\n';
  err(++it, args...);
}
static char buff[(int)1e6 + 17];
static constexpr long long inf = (long long)1e9 + 7ll;
inline void config_io(const bool& __fastio) {
  if (__fastio) {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
  }
  if (!std::string("").empty()) {
    assert(
        freopen(""
                ".in",
                "r", stdin));
    assert(
        freopen(""
                ".out",
                "w", stdout));
  }
}
const int maxn = (int)2e4 + 17;
int n, t;
double kek[11][maxn];
void dfs(int i, int j, double v) {
  if (v <= 1 - kek[i][j]) {
    kek[i][j] += v;
    v = 0;
  } else {
    v -= (1 - kek[i][j]);
    kek[i][j] = 1;
  }
  if (v > 0 && i + 1 < n) {
    dfs(i + 1, j, v / 2);
    dfs(i + 1, j + 1, v / 2);
  }
}
int main() {
  config_io(false);
  scanf("%d %d", &n, &t);
  for (int i = 0; i < t; ++i) dfs(0, 0, 1.0);
  int ans = 0;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < maxn; ++j)
      if (kek[i][j] == 1.0) ++ans;
  printf("%d\n", ans);
  return 0;
}
