#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  cin >> n;
  if (n == 2)
    cout << 1;
  else if (n % 3 == 1 || n % 3 == 2)
    cout << (n / 3) * 2 + 1;
  else
    cout << (n / 3) * 2;
}
