#include <iostream>
#include <bits/stdc++.h>

using namespace std;

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


	return 0;
}