#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n <= 2) {
    cout << 1;
    return 0;
  }
  int ans = 0, sum = 0, i = 1;
  while (sum <= n) {
    if (i % 2 == 0) {
      sum += 2;
    } else {
      sum++;
    }
    i++, ans++;
  }
  cout << ans - 1;
}
