#include <iostream>

using namespace std;

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