using System;

namespace Rextester
{
    public class Program
    {
        public static void Main(string[] args)
        {
           
            int A, B, C;
            string[] br = Console.ReadLine().Split(' ');
            B = int.Parse(br[0]);
            C = int.Parse(br[1]);
            if ((B + C) >= 256)
                A = 0;
            else if (B >= C)
                A = 256 - B;
            else
                A = 256 - C;
           
            
            Console.WriteLine(A);
        
        }
    }
}