#include <bits/stdc++.h>

using namespace std;

int resenje(int x, int y){
    int z;
    if(x + y >= 256)
        z = 0;
    else
        z = 256 - max(x, y);
    return z;
}

int main(){
    int x, y;
    cin >> x >> y;
    cout << resenje(x, y);
    return 0;
}