// O(N^4)
// Constantin Galatan
#include <fstream>
#include <iostream>
#define MOD 578537
#define DIM 501
using namespace std;

ifstream fin("sumk.in");
ofstream fout("sumk.out");

int N, K;
int a[2][DIM][DIM];

int main()
{
    fin >> N >> K;
    int lc = 1, lp = 0;
    for ( int s = 0; s <= K; ++s )
        a[0][1][s] = 1;
    for ( int j = 2; j <= N; ++j )
        for ( int s = 0; s <= K; ++s )
            for ( int p = 0; p <= s; ++p)
                a[0][j][s] = (a[0][j][s] + a[0][j-1][s-p]) % MOD;

    for ( int i = 2; i <= N; ++i,lc = !lc, lp = !lp )
        for (int j = 2; j <= N; ++j )
            for ( int s = 0; s <= K; ++s )
            {
                a[lc][1][s] = a[lp][1][K];
                a[lc][j][s] = a[lc][j-1][s];
                for ( int p = 1; p < s; ++p)
                    a[lc][j][s] = ( a[lc][j][s] + a[lc][j-1][s-p]) % MOD;

                a[lc][j][s] = (a[lc][j][s] + a[lp][j][K]) % MOD;
            }

    fout << a[lp][N][K] << '\n';

    fin.close();
    fout.close();
    return 0;
}
