#include <iostream>

using namespace std;

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