#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll mod = 1000000007;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    /***/
    int b,c;
    cin >> b >> c;
    if(b+c >= 256)
        cout << 0;
    else
        cout << 256-max(b,c);
    return 0;
}