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