#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100000], b, c, x, y, z, m, i, j, t;
  string s;
  cin >> n;
  if (n % 3 == 1 || n % 3 == 2) {
    x = n / 3;
    cout << x * 2 + 1 << endl;
  } else if (n % 3 == 0) {
    m = n / 3;
    cout << m * 2 << endl;
  }
  return 0;
}
