#include <iostream>
#include <stdio.h>
#include <algorithm>
using namespace std;

int main()
{   int B,C,minimalan,veci;
    cin >> B >> C;
    if((B+C)>=256) cout << 0;
    else {
        cout << (256-max(B,C));
    }
    

    return 0;
}