while 1: try: n = int(input()) if n >= 3: if n % 2 == 1: print(2) else: if n % 4 == 0: print(3) else: print(4) else: print(-1) except: ...