#yuki634 import sys n=int(raw_input()) l=[] i=1 while True: x=i*(i+1)/2 if x