using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp6
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            int b = Convert.ToInt32(s[0]);
            int c = Convert.ToInt32(s[1]);
            int max = Math.Max(b, c);
            if (b + c > 255) Console.Write(0);
            else Console.Write(256 - max);           
            Console.ReadKey();
        }
    }
}