using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

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