#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, c = 0, s = 0;
  cin >> n;
  if (n % 3 == 0) {
    s = n / 3;
    c = s * 2;
  }
  if (n % 3 != 0) {
    s = n / 3;
    c = (s * 2) + 1;
  }
  cout << c << "\n";
}
