#include <bits/stdc++.h>
using namespace std;
int main() {
  double n;
  cin >> n;
  double q = 2 * (n / 3);
  double qx = q - (int)q;
  if (qx > 0.5) q = 1 + int(q);
  if (qx < 0.5) q = q - qx;
  cout << (long long)q << endl;
  return 0;
}
