#include <bits/stdc++.h>

using namespace std;

int main()
{
    

    int B,C,A;
    cin>>B>>C;
    if(B+C>=256) cout<<0<<"\n";
    else
    {
        A=256-max(B,C);
        cout<<A<<"\n";
    }

    return 0;
}