#include <iostream>
using namespace std;

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