using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Baekjoon
{
class Program
{
static void Main(string[] args)
{
int y = int.Parse(Console.ReadLine());
int result = y - 543;
Console.WriteLine(result);
}
}
}