4938: 大象

内存限制:256 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:5 通过:4

题目描述

一头大象想去看望他的朋友。以一条直线来看,大象的房子位于0点而他朋友的房子位于x点(x0)。大象可以想前每部走12345。请确定一下最少多少步大象可以到达他朋友家。



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 1, 2, 3, 4 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.
Input
The first line of the input contains an integer x (1≤x≤1000000)− The coordinate of the friend's house.
Output
Print the minimum number of steps that elephant needs to make to get from point 0 to point x.
Examples
Input
5
Output
1
Input
12
Output
3
Note
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.

输入格式

第一行为一个整数x1 ≤ x ≤ 1000000)一 朋友房子的坐标。

输出格式

输出大象到他朋友家的最少步数。
Examples
Input
5
Output
1
Input
12
Output
3

根据题意很容易知道,先按最大的步距离的走,当要走的距离小于当前步距离时,判断一下剩余距离是否为0,为0则输出x/5,反之输出x/5+1。因为按最大步数走完后,剩下的距离走4321中的一步就可以走完了。一点细节:如果末尾数字为 11 (即需要翻转),那么答案要 +1+1


输入样例 复制

12

输出样例 复制

3