CF669A.Little Artem and Presents

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Little Artem got nn stones on his birthday and now wants to give some of them to Masha. He knows that Masha cares more about the fact of receiving the present, rather than the value of that present, so he wants to give her stones as many times as possible. However, Masha remembers the last present she received, so Artem can't give her the same number of stones twice in a row. For example, he can give her 33 stones, then 11 stone, then again 33 stones, but he can't give her 33 stones and then again 33 stones right after that.

How many times can Artem give presents to Masha?

输入格式

The only line of the input contains a single integer nn ( 1<=n<=1091<=n<=10^{9} ) — number of stones Artem received on his birthday.

输出格式

Print the maximum possible number of times Artem can give presents to Masha.

输入输出样例

  • 输入#1

    1
    

    输出#1

    1
    
  • 输入#2

    2
    

    输出#2

    1
    
  • 输入#3

    3
    

    输出#3

    2
    
  • 输入#4

    4
    

    输出#4

    3
    

说明/提示

In the first sample, Artem can only give 11 stone to Masha.

In the second sample, Atrem can give Masha 11 or 22 stones, though he can't give her 11 stone two times.

In the third sample, Atrem can first give Masha 22 stones, a then 11 more stone.

In the fourth sample, Atrem can first give Masha 11 stone, then 22 stones, and finally 11 stone again.

首页