Minimum number of bills
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given positive integer N (8 ≤ N ≤ 1000000), which defines any integer amount of money ≤ 1000000. It is known that the integer sum of money greater than or equal to 7 monetary units, can be requested only bills in denominations of 2 and 5 monetary units. Determine how many denominations of 2 and 5 units of money can give the amount of N units of money to their total number was minimal.
Input
Single number - the sum given.
Output
Single number - the required minimum number of cuts.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 38%