打个表,显然是n - (n + 2) / 3.
#define others
#ifdef poj
#include <iostream>
#include <cstring>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#endif // poj
#ifdef others
#include <bits/stdc++.h>
#endif // others
//#define file
#define all(x) x.begin(), x.end()
using namespace std;
const double eps = 1e-8;
int dcmp(double x) { if(fabs(x)<=eps) return 0; return (x>0)?1:-1;};
typedef long long LL;
namespace solver {
void solve() {
LL n;
cin >> n;
cout<<1LL* n - (n + 2) / 3<<endl;
}
}
int main() {
#ifdef file
freopen("gangsters.in", "r", stdin);
freopen("gangsters.out", "w", stdout);
#endif // file
// int t;
// scanf("%lld", &t);
// while(t--)
solver::solve();
return 0;
}
/*
3 5
-7 -23 -5 -24 -16
-5 -21 -4 -10 -23
-21 -5 -4 -20 -20
*/