问题 4878 --大象访友

4878: 大象访友

时间限制: 1 Sec  内存限制: 128 MB
提交: 261  解决: 198
[提交][状态][命题人:]

题目描述

    今天天气太好了,阳光明媚,大象决定去拜访他的朋友。 大象的家和朋友的家在一条直线上,相距x米。大象一步可以走1米、2米、3米、4米或者5米,请问大象至少需要走多少步才能达到他的朋友的家?

An elephant decided to visit his friend. It turned out that the elephant's house is located at point 0 and his friend's house is located at point x(x > 0) of the coordinate line. In one step the elephant can move 1234 or 5 positions forward. Determine, what is the minimum number of steps he need to make in order to get to his friend's house.

输入

一个整数x(1≤x≤1 000 000),表示大象的家到朋友家的距离。

The first line of the input contains an integer x (1 ≤ x ≤ 1 000 000) — The coordinate of the friend's house.

输出

大象到朋友家所需要的最小步数。

Print the minimum number of steps that elephant needs to make to get from point 0 to point x.

样例输入
Copy
12
样例输出
Copy
3

提示

样例2输入:

5

样例2输出:

1

In the first sample the elephant needs to make one step of length 5 to reach the point x.

In the second sample the elephant can get to point x if he moves by 3, 5 and 4. There are other ways to get the optimal answer but the elephant cannot reach x in less than three moves.

来源

[提交][状态]