#include <stdio.h>
#include <iostream>
using namespace std;


int main()
{
    int drugikrug;
    int trecikrug;
    cin>>drugikrug;
    cin>>trecikrug;
    if(drugikrug+trecikrug>=256){
        cout<<"0";
    }else {if(drugikrug>trecikrug) cout<<256-drugikrug; else cout<<256-trecikrug;}
    return 0;
}