Submit solution

Points:
5 (partial)

Time limit:
0.5s

Memory limit:
128M

Author:

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Josh loves solving problems. However, solving problems takes a lot of time, so he will sometimes batch problems together, which allows him to solve them quicker. He will do it according to the following rules:

- Every 2 problems takes him 1 minute to solve (rounded down).
- Every 7 problems takes him 1 less minute to solve than usual.

Some examples:

- Solving problems takes Josh minutes. It takes him minutes to solve the problems usually. However, since he's solved problems, and every problems takes less minute, he will only take minutes.
- Solving problems takes Josh minutes in total.
- Solving problem takes Josh minutes.

Josh has only minutes to solve as many problems as possible. Can you determine the maxmium number of problems he can solve?

#### Input Specification

The first line will contain the integer .

#### Output Specification

Output the maximum number of problems Josh can solve in minutes.

#### Subtasks

##### Subtask 1 [37%]

##### Subtask 2 [63%]

No further constraints.

#### Sample Input For Subtask 1

`5`

#### Sample Output For Subtask 1

`15`

#### Explanation For Sample For Subtask 1

Solving problems takes him minutes, which is exactly the amount of time he has.

#### Sample Input For Subtask 2

`1000000007`

#### Sample Output For Subtask 2

`2800000021`

## Comments