303454: CF669A. Little Artem and Presents
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Little Artem and Presents
题意翻译
问每次给个数,相邻的数不能一样,和为n,怎么才能使次数最多,最多为多少次;题目描述
Little Artem got $ n $ 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 $ 3 $ stones, then $ 1 $ stone, then again $ 3 $ stones, but he can't give her $ 3 $ stones and then again $ 3 $ stones right after that. How many times can Artem give presents to Masha?输入输出格式
输入格式
The only line of the input contains a single integer $ n $ ( $ 1<=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