#include <iostream>
#include<algorithm>

using namespace std;

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