X=int(input()) a=X/2+X%2/2-2 if X==2: b=2 elif X%2==1: b=5+a*10 else: b=4+a*10 print(int(b))