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