n = int(input()) ans = 0 if n >= 7: ans += 7*(n-6)+6 else: ans = n print(ans)