#include <cstdio>
#define DIM 502
#define MOD 578537
using namespace std;

int b[DIM][DIM], n, k, i, j, t, sum;
int a[DIM][DIM];
long long aux;

FILE *fin = fopen("sumk.in","r");
FILE *fout = fopen("sumk.out","w");

int main() {
    fscanf(fin,"%d %d",&n,&k);

    for (i=0;i<=n;i++)
        b[0][i] = 1;

    for (i=1;i<=n;i++) {
       // b[i][0] = 1;
        for (j=1;j<=n;j++) {
            b[i][j] = b[i-1][j] + b[i][j-1];
            if (b[i][j] >= MOD)
                b[i][j] -= MOD;
        }

    }

//    a[i][j] = numarul de moduri sa rezolv problema cu i linii si j coloane

    for (i=1;i<=n;i++)
        a[1][i] = b[k-1][i];

    for (i=2;i<=n;i++)
        for (j=1;j<=n;j++) {
            // calculez a[i][j]
            for (t=1;t<=j;t++) {
                aux = a[i-1][t] * (long long) b[k-1][j-t+1] % MOD;
                a[i][j] += aux;
                if (a[i][j] >= MOD)
                    a[i][j] %= MOD;
            }
        }


    sum = 0;
    for (i=1;i<=n;i++)
        sum += a[n][i];
    fprintf(fout,"%d\n",sum % MOD);
/*
    for (i=1;i<=n;i++) {
        for (j=1;j<=n;j++)
            fprintf(fout,"%6d",b[i][j]);
        fprintf(fout,"\n");
    }
*/

    return 0;
}
