

Input

The input contains a single integer a (10 ≤ a ≤ 999).

Output

Output 0 or 1.

Examples

Input

13


Output

1


Input

927


Output

1


Input

48


Output

0
from fractions import gcd
from math import factorial, ceil, sqrt, atan2, log, pi, e, asin,acos, cos, sin
from itertools import *
from fractions import Fraction
import string
import copy
import random
from time import *
import bisect
from decimal import *
def id_generator(size=20, chars=string.digits):
	return ''.join(random.choice(chars) for _ in range(size))
 
def mp():
	return map(int,str(raw_input()).split())


n=input()
print n%2