#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll n;
  cin >> n;
  if (n == 0)
    cout << 0;
  else if (n == 1 || n == 2)
    cout << 1;
  else {
    ll ans = 0;
    ll pairs = n / 3;
    ll extra = n % 3;
    ans = pairs * 2 + (extra ? 1 : 0);
    cout << ans;
  }
  return 0;
}
