#include <iostream>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int b, c;
    cin>> b;
    cin>> c;

    if (b >= 256 || c >= 256 || (b + c)>= 256) {
        cout<< 0;
    }else{
        cout<< 256 - max(b,c);
    }

    return 0;
}