#include <bits/stdc++.h>

using namespace std;

#define pii pair<int,int>
#define ll long long
#define s second
#define f first

ll b, c;

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