# 规律:除以2,再向下取整
import math
while True:
try:
n = int(input())
if n == 0:
break
else:
m = math.floor(n/2)
print(m)
except:
break
# 规律:除以2,再向下取整
import math
while True:
try:
n = int(input())
if n == 0:
break
else:
m = math.floor(n/2)
print(m)
except:
break