#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
const long long int INF = 1e18;
const long long int N = 2e5 + 5;
int32_t main() {
  long long int n;
  cin >> n;
  long long int k = n % 3;
  if (k)
    cout << 2 * (n / 3) + 1;
  else
    cout << 2 * (n / 3);
  return 0;
}
