C 数学 B站讲解https://www.bilibili.com/video/BV1GT4y1M78d?p=2
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
//typedef __int128 INT;
typedef double db;
typedef vector<int> vii;
typedef vector<ll> vll;
typedef pair<int,int> PII;
#define so sizeof
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define fi first
#define se second
#define mp make_pair
//#define lb lower_bound
#define ub upper_bound
const db esp=1e-5;
const int N=2e5+10,M=2e5+10,Max=500,inf=0x3f3f3f3f,mod=998244353;
const ll INF=0x3f3f3f3f3f3f3f3f;
ll n;
void work(){
cin>>n;
ll ans=n/(3+1)*2;
ll re=n%(4);
if(re==3) ans++;
else ans+=re;
cout<<ans<<endl;
return ;
}
int main(){
work();
return 0;
}


京公网安备 11010502036488号