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

int b, c;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    cin >> b >> c;

    if(b + c >= 256){cout << 0 << "\n";}
    else{
        cout << max(256 - max(b, c), 0) << "\n";
    }

    return 0;
}