#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a, b, c;
    cin >> b >> c;
    if (b >= 256 || c >= 256)
        a = 0;
    else
    {
        a = 256 - max(b, c);
    }
    cout << a;
    return 0;
}