using System;
class Program
{
    static void Main(string[] args)
    {
        string input = Console.ReadLine();
        int b = int.Parse(input.Split(' ')[0]);
        int c = int.Parse(input.Split(' ')[1]);
        int max1 = b;
        if(c > max1)
        {
            max1 = c;
        }
        if(b + c >= 256)
        {
            Console.WriteLine("0");
        }
        else
        {
            Console.WriteLine("" + (256 - max1));
        }
    }
}