numList = []
while True:
    try:
        num = int(input())
        numList.append(num)
        if num == 0:
            break
    except:
        break
numList.pop()

count = 0
countList = []
for n in numList:
    while True:
        try:
            n -= 2
            count += 1
            if n == 0 or n == 1:
                countList.append(count)
                count = 0
                break
        except:
            break
for c in countList:
    print(c)