#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,num;
while(cin>>n)
{
num=n;
num+=n/3;
n=n%3+n/3;
while(n>=3)
{
num+=n/3;
n=n%3+n/3;
//cout<<n<<' '<<num<<endl;
}
if(n>1) num+=1;
cout<<num<<endl;
}
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,num;
while(cin>>n)
{
num=n;
num+=n/3;
n=n%3+n/3;
while(n>=3)
{
num+=n/3;
n=n%3+n/3;
//cout<<n<<' '<<num<<endl;
}
if(n>1) num+=1;
cout<<num<<endl;
}
}
#include <bits/stdc++.h> using namespace std; int main(int argc, char** argv){ int a; while(cin>>a) cout<<a*3/2<<endl; }
同學~~~這是我的XD