100.0% (86/86)

74.4% (128/172)

# Description

There are so many candies in a candy shop. In this shop, candies can be sold by package or individually.

• by package: 7 candies per package － $28 • individually: only one candy －$5

Now you want to buy $n$ candies. Please calculate how many dollars you should spend at least.
You can't buy more than $n$ candies, even thought it is cheaper.

# Input Format

A non-negative integer $n\ (n\leq 10000)$

# Output Format

An integer indicating how much the candies cost.

50

201

# Problem Source

No. Testdata Range Score
1 0~9 100

# Testdata and Limits

No. Time Limit (ms) Memory Limit (KiB) Output Limit (KiB) Subtasks
0 1000 65536 65536 1
1 1000 65536 65536 1
2 1000 65536 65536 1
3 1000 65536 65536 1
4 1000 65536 65536 1
5 1000 65536 65536 1
6 1000 65536 65536 1
7 1000 65536 65536 1
8 1000 65536 65536 1
9 1000 65536 65536 1