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