https://www.acmicpc.net/problem/2753
using System;
class Program
{
static void Main() {
string s=Console.ReadLine();
int n=int.Parse(s);
if(n%4==0 && n%100!=0 || n%400==0) Console.Write(1);
else Console.Write(0);
}
}