Contest Duration: ~ (local time) (100 minutes) Back to Home
A - Grouping 2 /

Time Limit: 2 sec / Memory Limit: 256 MB

### 問題文

ある学校には、N 人の生徒がいます。

あなたは、2 人以下のグループだと効果的な話し合いが出来ないと考えており、なるだけ多くのグループを 3 人以上にしたいです。

### 制約

• 1 \leq N \leq 1000
• 入力は全て整数

### 入力

N


### 出力

3 人以上のグループを最大で x 個作れるとき、x を出力せよ。

### 入力例 1

8


### 出力例 1

2


### 入力例 2

2


### 出力例 2

0


どのように生徒たちを分けても 3 人以上のグループを作れない場合もあります。

### 入力例 3

9


### 出力例 3

3


Score : 100 points

### Problem Statement

There are N students in a school.

We will divide these students into some groups, and in each group they will discuss some themes.

You think that groups consisting of two or less students cannot have an effective discussion, so you want to have as many groups consisting of three or more students as possible.

Divide the students so that the number of groups consisting of three or more students is maximized.

### Constraints

• 1 \leq N \leq 1000
• All input values are integers.

### Input

Input is given from Standard Input in the following format:

N


### Output

If you can form at most x groups consisting of three or more students, print x.

### Sample Input 1

8


### Sample Output 1

2


For example, you can form a group of three students and another of five students.

### Sample Input 2

2


### Sample Output 2

0


Sometimes you cannot form any group consisting of three or more students, regardless of how you divide the students.

### Sample Input 3

9


### Sample Output 3

3