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;
const long long N = 510;
long long n, k, dp[2][N][N], z[N];
inline void add(long long &a, long long b) {
  a = ((a + b >= 1000000007) ? a + b - 1000000007 : a + b);
}
inline void del(long long &a, long long b) {
  a = ((a - b < 0) ? a - b + 1000000007 : a - b);
}
inline void mul(long long &a, long long b) { a = a * b % 1000000007; }
inline long long m_pow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) mul(ans, a);
    b >>= 1;
    mul(a, a);
  }
  return ans;
}
inline long long read() {
  long long f = 1, x = 0;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = x * 10 + s - '0';
    s = getchar();
  }
  return x * f;
}
signed main() {
  n = read();
  k = read();
  if (k == 0) {
    printf("1\n");
    return 0;
  }
  z[0] = 1;
  for (long long i = 1; i <= n; i++) z[i] = z[i - 1] * 2 % 1000000007;
  dp[0][0][0] = 1;
  long long cur = 0;
  for (long long i = 0; i < n; i++) {
    memset(dp[cur ^ 1], 0, sizeof(dp[cur ^ 1]));
    for (long long j = 0; j <= i; j++) {
      for (long long k = 0; k <= i; k++)
        if (dp[cur][j][k]) {
          add(dp[cur ^ 1][j][k], dp[cur][j][k] * z[j] % 1000000007);
          add(dp[cur ^ 1][i + 1][k + 1], dp[cur][j][k] * (z[i - j + 1] - 1) %
                                             1000000007 * z[j] % 1000000007);
        }
    }
    cur ^= 1;
  }
  long long ans = 0;
  for (long long i = 0; i <= n; i++) add(ans, dp[cur][i][k]);
  printf("%lld\n", ans);
}