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