while True: # 多组测试输入数据,记住这个格式 try: n = int(input()) if n == 0: break else: print(n//2) except: break