Problem: Let's assume that set S consists of m distinct intervals [l1, r1], [l2, r2], ..., [lm, rm] (1 ≤ li ≤ ri ≤ n; li, ri are integers).

Let's assume that f(S) is the maximum number of intervals that you can choose from the set S, such that every two of them do not intersect. We assume that two intervals, [l1, r1] and [l2, r2], intersect if there is an integer x, which meets two inequalities: l1 ≤ x ≤ r1 and l2 ≤ x ≤ r2.

Sereja wonders, how many sets S are there, such that f(S) = k? Count this number modulo 1000000007 (109 + 7).

Input

The first line contains integers n, k (1 ≤ n ≤ 500; 0 ≤ k ≤ 500).

Output

In a single line, print the answer to the problem modulo 1000000007 (109 + 7).

Examples

Input

3 1


Output

23


Input

3 2


Output

32


Input

2 0


Output

1


Input

2 2


Output

2

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
struct _ {
  _() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
  }
  stringstream ss;
} _;
template <class A, class B>
ostream &operator<<(ostream &o, pair<A, B> t) {
  o << "(" << t.first << ", " << t.second << ")";
  return o;
}
template <class T>
inline string tostring(T first) {
  _.ss.clear();
  _.ss.str("");
  _.ss << first;
  return _.ss.str();
}
template <class T>
inline T convert(const string &s) {
  char *p;
  if (is_integral<T>())
    return strtoll(s.c_str(), &p, 10);
  else
    return strtod(s.c_str(), &p);
}
template <class T>
void PV(T a, T b, int p = 0, int w = 0, string s = " ") {
  int c = 0;
  while (a != b) {
    cout << setw(w) << *a++;
    cout << ((a != b && (!p || ++c % p)) ? s : "\n");
  }
  cout.flush();
}
template <class T>
inline bool chmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
inline bool chmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
const long long linf = 0x3f3f3f3f3f3f3f3fLL;
const int inf = 0x3f3f3f3f;
const int mod = int(1e9) + 7;
const int N = 510;
int dp[2][N][N];
int n, k;
int p2[N];
int main() {
  p2[0] = 1;
  for (int i = 1; i < N; i++) p2[i] = 2 * p2[i - 1] % mod;
  cin >> n >> k;
  dp[0][0][0] = 1;
  for (int cur = 0; cur < n; cur++) {
    int from = cur & 1, to = 1 - from;
    memset(dp[to], 0, sizeof(dp[to]));
    ;
    for (int last = 0; last <= cur; last++)
      for (int nk = 0; nk <= k; nk++) {
        int first = dp[from][last][nk];
        dp[to][last][nk] =
            (dp[to][last][nk] + (long long)p2[last] * first) % mod;
        dp[to][cur + 1][nk + 1] = (dp[to][cur + 1][nk + 1] +
                                   (long long)(p2[cur - last + 1] + mod - 1) *
                                       p2[last] % mod * first) %
                                  mod;
      }
  }
  int res = 0;
  for (int last = 0; last <= n; last++) res = (res + dp[n & 1][last][k]) % mod;
  cout << res << endl;
  cerr << "{"
          "0"
          " -> "
          "clock()"
          ": "
       << 1000 * (clock() - 0) / CLOCKS_PER_SEC << "ms}\n";
  ;
  return 0;
}