#158. makeChocolate

makeChocolate

Background

Description

We want make a package of goal kilos of chocolate. We have small bars (1 kilo each) and big bars (5 kilos each). Return the number of small bars to use, assuming we always use big bars before small bars. Return -1 if it can't be done.

Format

Input

Output

Samples

4 1 9
4
4 1 10
-1
4 1 7
2

Limitation

1s, 1024KiB for each test case.