Repovive
  • Dashboard
  • Ranking
  • Submissions
  • Discussion
  1. Contests
  2. Standard Round 1
  3. 4A

My submissions

/
/
/
/

Announcements

My submissions

/
/
/
/

Announcements

Solve
Author

4A. Pouri is less than Parham

500 pts·2s·256 MB

Input

nnn

Output

Samples

Input
2
Output
1
Input
3
Output
1

You are given an integer nnn.

You have exactly nnn apples, and you want to distribute all of them between two people: Pouri and Parham.

Let ppp be the number of apples given to Pouri and qqq be the number of apples given to Parham. You must have:

  • p+q=np + q = np+q=n
  • p≤qp \le qp≤q

Your goal is to maximize ppp. Output this maximum possible value of ppp.

Constraints

  • 1≤n≤10001 \le n \le 10001≤n≤1000

max⁡p\max pmaxp