x = int(input())
if x == 1:
print(x, 'год')
elif x < 5:
print(x, 'года')
elif x == 21 or x == 31 or x == 41 or x == 51 or x == 61 or x == 71 or x == 81 or x == 91:
elif x > 4:
print(x, 'лет')
x = int(input())
if x == 1:
print(x, 'год')
elif x < 5:
print(x, 'года')
elif x == 21 or x == 31 or x == 41 or x == 51 or x == 61 or x == 71 or x == 81 or x == 91:
print(x, 'год')
elif x > 4:
print(x, 'лет')