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