#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, k, m, a, b, c, q;
  long long n;
  cin >> n;
  long long p = 1, ans = 0;
  while (n && n >= p) {
    ans++;
    n -= p;
    if (p == 1)
      p = 2;
    else
      p = 1;
  }
  cout << ans << endl;
  return 0;
}
