hoge = int(input()) count=0 for i in range(1,hoge//3+1): for j in range(i,hoge//2+1): for t in range(j,hoge): if i+j+t==hoge-1: print(i,j,t) count=count+1 break print(count)