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 int inf = 0x20202020;
const long long mod = 1000000007;
const double eps = 1e-9;
const double pi = 3.1415926535897932384626;
const int DX[] = {1, 0, -1, 0}, DY[] = {0, 1, 0, -1};
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long powmod(long long a, long long b, long long mod) {
  long long res = 1;
  a %= mod;
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long dp[510][510], pd[510][510], p2[510], ans;
int n, m;
int main() {
  scanf("%d%d", &n, &m);
  p2[0] = 1;
  for (int i = 1; i < (int)n + 1; i++) p2[i] = p2[i - 1] * 2 % mod;
  dp[0][0] = 1;
  for (int i = 0; i < (int)n; i++) {
    memset(pd, 0, sizeof(pd));
    for (int j = 0; j < (int)i + 1; j++)
      for (int k = 0; k < (int)i + 1; k++)
        if (dp[j][k]) {
          (pd[i + 1][k + 1] += dp[j][k] * (p2[i + 1] - p2[j])) %= mod;
          (pd[j][k] += dp[j][k] * p2[j]) %= mod;
        }
    memcpy(dp, pd, sizeof(pd));
  }
  for (int j = 0; j < (int)n + 1; j++) (ans += dp[j][m]) %= mod;
  if (ans < 0) ans += mod;
  printf("%I64d\n", ans);
}