#include<bits/stdc++.h>
using namespace std;
int a,b,m;
void resenje1(){
    int c;
    c=0;
    cout<< c <<endl;
}
void resenje2(){
    int c;
    c=256-m;
    cout<< c <<endl;
}
int main(){
    cin>> a >> b ;
    m=max(a,b);
    if(a+b>=256)resenje1();
    else resenje2();
    return 0;
}