n = int(input()) if n > 10 ** 9 or 1 > n: raise ValueError