#include<iostream>
using namespace std;
int maksF(int b, int c)
{
    if(b > c)
        return b;
    return c;
}
int main()
{
    int a, b, c, maks;
    cin >> b >> c;
    maks = maksF(b, c);
    if(maks<=256)
        a=256-maks;
    else a=0;
    cout << a;
    return 0;
}