using System;
class Program
{
    static void Main()
    {
        var s = Console.ReadLine().Split();
        int A = 0;
        int B = int.Parse(s[0]);
        int C = int.Parse(s[1]);
        if(B + C >= 256)
            Console.WriteLine(A);
        else
        {
            int max = B;
            if(max < C)
                max = C;
            A = 256 - max;
            Console.WriteLine(A);
        }
    }
}