#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a, b, c;
    cin>>b>>c;

    if(b+c > 256) cout<<0;
    else
    {
        a = max(b, c);
        cout<<256 - a;
    }

    return 0;
}