#include <cstdio>
#include <algorithm>
#include <iostream>
#include <algorithm>
#include <cmath>


using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    int a, b, c;
    cin>>a>>b;
    if(a+b>=256)
    {
        cout<<"0";
    }
    else
    {
        c = 256-max(a, b);
        cout<<c;
    }





    return 0;
}