#include <iostream>

using namespace std;

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

}