while True:
    n = int(input().strip())
    if n == 0:
        break
    else:
        print(n//2)