#include <bits/stdc++.h>
using namespace std;
string asd4(string s, string c) {
  string v = "", m = "";
  char b = '0';
  for (int i = 63; i >= 0; i--) {
    if (b == '0' && c[i] == '0' && s[i] == '0')
      v += '0';
    else if ((b == '0' && c[i] == '1' && s[i] == '0') ||
             (b == '0' && c[i] == '0' && s[i] == '1') ||
             (b == '1' && c[i] == '0' && s[i] == '0'))
      v += '1', b = '0';
    else if ((b == '0' && c[i] == '1' && s[i] == '1') ||
             (b == '1' && c[i] == '1' && s[i] == '0') ||
             (b == '1' && c[i] == '0' && s[i] == '1'))
      v += '0', b = '1';
    else if ((b == '1' && c[i] == '1' && s[i] == '1'))
      v += '1', b = '1';
    m += b;
  }
  if (b == '1') m += '1';
  return m;
}
int asd5(int n, int &x) {
  if (n == 1)
    return 1;
  else if (n % 2 != 0) {
    x++;
    return asd5(3 * n + 1, x);
  } else {
    x++;
    return asd5(n / 2, x);
  }
}
void fast() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  fast();
  long long n, i;
  int x = 0;
  cin >> n;
  i = n / 3.0;
  if (n % 3 != 0) x++;
  x += i * 2;
  cout << x << endl;
  return 0;
}
