n = int(input()) assert 2 <= n <= 10 ** 9