n=int(input())
wait=n//12        # 需要等wait个上下
print(4*wait+2)    # 需要等待的时间