#include <bits/stdc++.h>
using namespace std;

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