using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            String[] a = Console.ReadLine().Split();
            int b = int.Parse(a[0]);
            int c = int.Parse(a[1]);
            int zbir = b + c;
            int max;
            if (b > c)
                max = b;
            else
                max = c;
            int d;
            if(zbir >= 256)
            {
                d = 0;
            }
            else
            {
                d = 256 - max;
            }
            Console.WriteLine(d);

        }
    }
}