#include<bits/stdc++.h>

using namespace std;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int a = 0, b, c;
    cin >> b >> c;
    if(b + c < 256)
    {
        a = max(b, c);
        a = 256 - a;
    }
    cout << a <<endl;
}