#include <iostream>

int main()
{
    short int B, C;
    std::cin >> B >> C;
    if (B >= 256 || C >= 256)
        std::cout << 0;
    else if (B >= C)
        std::cout << 256 - B;
    else
        std::cout << 256 - C;
    return 0;
}