#include <bits/stdc++.h>
using namespace std;

#define endl "\n"
#define ll long long
#define PB push_back
#define F first
#define S second
#define all(a) a.begin(), a.end()
#define MAX 1000
#define Fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define w(a) cout<<#a<<" : "<<a<<endl;


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