Water Station

AtCoder
IDabc305_a
Time2000ms
Memory256MB
Difficulty
There is an ultramarathon course totaling $100\;\mathrm{km}$. Water stations are set up every $5\;\mathrm{km}$ along the course, including the start and goal, for a total of $21$. Takahashi is at the $N\;\mathrm{km}$ point of this course. Find the position of the nearest water station to him. Under the constraints of this problem, it can be proven that the nearest water station is uniquely determined. ## Constraints * $0\leq N\leq100$ * $N$ is an integer. ## Input The input is given from Standard Input in the following format: $N$ [samples]
Samples
Input #1
53
Output #1
55

Takahashi is at the $53\;\mathrm{km}$ point of the course. The water station at the $55\;\mathrm{km}$ point is $2\;\mathrm{km}$ away, and there is no closer water station. Therefore, you should print $55$.
Input #2
21
Output #2
20

Takahashi could also go back the way.
Input #3
100
Output #3
100

There are also water stations at the start and goal. Additionally, Takahashi may already be at a water station.
API Response (JSON)
{
  "problem": {
    "name": "Water Station",
    "description": {
      "content": "There is an ultramarathon course totaling $100\\;\\mathrm{km}$. Water stations are set up every $5\\;\\mathrm{km}$ along the course, including the start and goal, for a total of $21$. Takahashi is at the ",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc305_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "There is an ultramarathon course totaling $100\\;\\mathrm{km}$. Water stations are set up every $5\\;\\mathrm{km}$ along the course, including the start and goal, for a total of $21$.\nTakahashi is at the ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments