using System;

namespace prodjekt
{
	class Program
	{

		static void Main(string[] args)
		{
			string[] unos = Console.ReadLine().Split();
			int b = int.Parse(unos[0]);
			int c = int.Parse(unos[1]);

			int a;

			if ((b + c) >= 256)
				a = 0;
			else
				a = 256 - Math.Max(b, c);

			Console.WriteLine(a);
		}
	}
}