using System;

class Program
{
    static void Main(string[] args)
    {
        var linija = Console.ReadLine().Split();
        int B = int.Parse(linija[0]);
        int C = int.Parse(linija[1]);
        int S = B + C;
        if (S < 256)
            Console.WriteLine(256 - Math.Max(B, C));
        else
            Console.WriteLine(0);
    }
}