N=int(input()) M=max(N//3-3,0) X=M*3 Y=0 for i in range(100): X+=1 if X==N: print(Y+i+1+M*15) exit() if i%3==2: X-=2 Y+=2