Загрузка данных


n = int(input())
if n % 5 == 0:
    print(5)
elif n % 3 == 0:
    print(3)
else:
    print(1)