原题
 简单数学,理一下思路就可以
#include<bits/stdc++.h>
using namespace std;
const int N = 10010;
int n, res;
int main()
{
	cin>>n;
	res = n;
	while(n >= 3){
		int y = n / 3;//y表示用瓶盖换的饮料数 
		n %= 3;
		res += y;//res记录总饮料数 
		n += y;//这轮换的饮料还可以加上			
	}
	cout<<res<<endl;
}










