while True:
    try:
        i = int(input())
    except EOFError:
        break
    if i == 0:
        break
    print(i//2)