#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 50LL;
const double PI = 3.14159265358979323846264;
int main() {
  long long n;
  cin >> n;
  long long res = 2 * (n / 3);
  if (n % 3) res++;
  cout << res << endl;
  return 0;
}
