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;
template <int mod = 1000000007>
struct modint {
  int x;
  modint(int y = 0) : x((y % mod + mod) % mod) {}
  friend modint operator^(modint a, int64_t b) {
    modint r = 1;
    for (; b; b >>= 1, a *= a)
      if (b & 1) r *= a;
    return r;
  }
  friend modint operator-(modint a) { return modint(0) - a; }
  friend modint operator!(modint a) { return a ^ (mod - 2); }
  modint& operator/=(modint const& b) { return *this *= !b; }
  friend modint operator+(modint a, modint const& b) { return a += b; }
  friend modint operator-(modint a, modint const& b) { return a -= b; }
  friend modint operator*(modint a, modint const& b) { return a *= b; }
  friend modint operator/(modint a, modint const& b) { return a /= b; }
  friend bool operator!=(const modint& a, const modint b) { return a.x != b.x; }
  friend bool operator==(const modint& a, const modint b) { return a.x == b.x; }
  modint& operator*=(modint const& b) {
    x = 1LL * x * b.x % mod;
    return *this;
  }
  friend ostream& operator<<(ostream& os, modint const& a) { return os << a.x; }
  modint& operator+=(modint const& b) {
    x += b.x;
    x = (x >= mod) ? x - mod : x;
    return *this;
  }
  modint& operator-=(modint const& b) {
    x = x >= b.x ? x - b.x : x - b.x + mod;
    return *this;
  }
};
using mint = modint<>;
const int N = 505;
int n, k;
mint pwr[N], dp[N][N], P[N][N][2];
int32_t main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  pwr[0] = 1;
  for (int i = 1; i <= n; i++) {
    pwr[i] = pwr[i - 1] * 2;
  }
  dp[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    P[i + 1][i][1] = 1;
    for (int j = i; j >= 1; j--) {
      P[j][i][0] = (P[j + 1][i][0] + P[j + 1][i][1]) * pwr[n - i];
      P[j][i][1] = (P[j + 1][i][1] + P[j + 1][i][1]) * pwr[n - i];
    }
  }
  for (int i = 1; i <= k; i++) {
    for (int j = i; j <= n; j++) {
      for (int l = i - 1; l < j; l++) {
        dp[i][j] += dp[i - 1][l] * P[l + 1][j][0];
      }
    }
  }
  mint ans = 0;
  for (int i = k; i <= n; i++) {
    ans += dp[k][i];
  }
  cout << ans << endl;
}