617A. Elephant

617A. Elephant

617A. Elephant

  • time limit per test1 second
  • memory limit per test256 megabytes
  • inputstandard input
  • outputstandard output

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.

一头大象决定去拜访他的朋友。事实证明,大象的房子位于0点,而他的朋友的房子位于x点(x) > 坐标线的0)。在一个步骤中,大象可以向前移动1、2、3、4或5个位置。确定他到达朋友家所需的最小步数。

Input

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

输入的第一行包含一个整数x(1) ≤ 十、 ≤ 1. 000 000)-朋友家的坐标。

Output

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

打印大象从0点到x点所需的最小步数。

Examples
input1

5

output1

1

input2

12

output2

3

Note

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

在第一个样本中,大象需要走5步才能到达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.

在第二个样本中,如果大象移动3、5和4,就可以到达x点。还有其他方法可以获得最佳答案,但大象不可能在三步之内到达x。

CodeForces 文章被收录于专栏

https://codeforces.ml/

全部评论

相关推荐

不愿透露姓名的神秘牛友
昨天 16:15
我应届生,去年10月份开始在这家公司实习,到今年10月份正好一年想(实习+试用期),在想要不要提前9月份就离职,这样好找工作些,但又差一个月满一年,又怕10月份国庆回来离职,容易错过了下半年的金九银十,到年底容易gap到年后
小破站_程序员YT:说这家公司不好吧,你干了快一年 说这家公司好吧,你刚毕业就想跑路说你不懂行情吧,你怕错过金九银十说 你懂行情吧,校招阶段在实习,毕业社招想换工作 哥们,我该怎么劝你留下来呢
应届生,你找到工作了吗
点赞 评论 收藏
分享
Lorn的意义:你这种岗位在中国现在要么牛马天天加班,要么关系户进去好吃好喝,8年时间,真的天翻地覆了,对于资本来说你就说一头体力更好的牛马,哎,退伍没有包分配你真的亏了。
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务