#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    int drugikrug, trecikrug;
    cin>>drugikrug>>trecikrug;
    if (drugikrug+trecikrug<256)
    {
        cout<<256-max(drugikrug,trecikrug)<<endl;
    }
    else
    {
        cout<<0<<endl;
    }
    return 0;
}