using System;

namespace _1_Trud
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = "";
            s = Console.ReadLine();

            string[] ss = s.Split(" ");

            int b = Convert.ToInt32(ss[0]);
            int c = Convert.ToInt32(ss[1]);
            int a = 0;

            if (b + c < 256)
            {
                a = 256 - Math.Max(b, c);
            }

            Console.Write(a);
        }
    }
}