#include <bits/stdc++.h>

using namespace std;

int main()
{
    int b,c;
    cin>>b>>c;
    int x = b+c;
    if(x>=256){
        cout<<0<<endl;
    }
    else{
        int m = 0;
        if(b>c){
            m=b;
        }
        else{
            m=c;
        }
        int a = 256-m;
        cout<<a<<endl;
    }
}