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