while 1:
    n=int(input())
    if n!=0:
        print (n//2)
    else:
        break