#include <bits/stdc++.h>
using namespace std;
float a,b;
int main() {
    cin>>a>>b;
if(a+b>=256)cout<<"0";
    else if(a>=b and a+b<256)cout<<256-a;
            else if (b>=a and a+b<256)cout<<256-b;



return 0;
}