#include <bits/stdc++.h>

using namespace std;

int main()
{
    int b, c;

    cin >> b >> c;

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