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;
int getint() {
  unsigned int c;
  int x = 0;
  while (((c = getchar()) - '0') >= 10) {
    if (c == '-') return -getint();
    if (!~c) exit(0);
  }
  do {
    x = (x << 3) + (x << 1) + (c - '0');
  } while (((c = getchar()) - '0') < 10);
  return x;
}
const int MOD = 1000000007;
struct modint {
  int v;
  modint() : v(0) {}
  modint(int v) : v(v >= MOD ? v - MOD : v) {}
  modint(long long v) : v(v >= MOD ? v % MOD : v) {}
  void clear() { v = ~0; }
  bool is() { return ~v; }
  int to_int() { return v; }
  modint& operator+=(modint x) { return *this = v + x.v; }
  modint& operator-=(modint x) { return *this = MOD + v - x.v; }
  modint& operator*=(modint x) { return *this = (long long)v * x.v; }
  modint operator+(modint x) const { return modint(v) += x; }
  modint operator-(modint x) const { return modint(v) -= x; }
  modint operator*(modint x) const { return modint(v) *= x; }
  modint operator-() { return modint(0) - *this; }
};
ostream& operator<<(ostream& os, modint x) {
  os << x.v;
  return os;
}
modint mod_pow(modint x, long long n) {
  modint y = 1;
  for (; n; x *= x, n >>= 1)
    if (n & 1) y *= x;
  return y;
}
modint mod_inv(modint x) {
  modint y = 1;
  for (int n = MOD - 2; n; x *= x, n >>= 1)
    if (n & 1) y *= x;
  return y;
}
modint& operator/=(modint& x, modint y) { return x *= mod_inv(y); }
modint operator/(modint x, modint y) { return x /= y; }
int n, k;
modint dp[555][555];
modint pow2[555 * 500];
int main() {
  int i, j, tcc, tc = 1 << 28;
  pow2[0] = 1;
  for (i = 1; i < 555 * 500; i++) pow2[i] = pow2[i - 1] * 2;
  for (tcc = 0; tcc < tc; tcc++) {
    n = getint(), k = getint();
    memset(dp, 0, sizeof(dp)), dp[0][0] = 1;
    for (int pos = 1; pos <= n; pos++) {
      for (int prevk = 0; prevk < k; prevk++) {
        modint add = 0;
        for (int prevpos = 0; prevpos < pos; prevpos++) {
          modint prev = dp[prevpos][prevk];
          if (prev.v != 0) {
            modint way = pow2[(pos - prevpos) * (prevpos + 1)] -
                         pow2[(pos - prevpos) * prevpos];
            add += prev * way;
          }
        }
        dp[pos][prevk + 1] = add;
      }
    }
    modint res = 0;
    for (int pos = 0; pos <= n; pos++) {
      modint prev = dp[pos][k];
      if (prev.v) {
        modint way = pow2[(n - pos) * pos];
        res += prev * way;
      }
    }
    cout << res << endl;
  }
  return 0;
}