#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9, maxn = (int)1e5 + 5;
const double eps = (double)1e-8;
const int mod = (int)1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int c = 0;
  while (n > 0) {
    if (c % 2) {
      if (n == 1) --c;
      n -= 2;
    } else
      n -= 1;
    ++c;
  }
  cout << c;
  return 0;
}
