#include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
    unsigned int A,B,C;
    cin>>B>>C;
    if (B+C>=256)
    {
        A=0;
    }
    else
    {
        if (B>C)
        {
            A=256-B;
        }
        else
        {
            A=256-C;
        }
    }
    cout<<A;
    
    return 0;
}