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