#include <iostream>

using namespace std;

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