using System;

namespace Minimalan_trud
{
	class Program
	{
		static void Main(string[] args)
		{
			string[] s = Console.ReadLine().Split();
			int b, c;
			b = int.Parse(s[0]);
			c = int.Parse(s[1]);
			int a;
			if (b + c < 256)
			{
				a = 256 - Math.Max(b, c);
			}
			else
			{
				a = 0;
			}
			Console.WriteLine(a);
		}
	}
}