#include <iostream>

using namespace std;

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

}