#include <bits/stdc++.h>

using namespace std;

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