x=int(input()) p=0 g=0 for _ in range(100): for dp in [2,2,-1,-1,2,-1,-1]: p+=dp g+=abs(dp) if p==x: print(g) exit()