#include <iostream>
using namespace std;

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

    return 0;
}