N = int(input()) # 6問解いたら6問追加され、その直後に1問解ける # 残数が6問以下になれば、その問題数と同じ日数で解ける ans = 0 while N: if N < 7: ans += N break else: N -= 1 ans += 7 print(ans)