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