#include <bits/stdc++.h>
using namespace std;
long long n, m, k, a[1000001], b[1000001], kq, x;
int main() {
  cin >> n;
  k = n / 3;
  x = n - k * 2;
  if (k > x + 1) k = x + 1;
  if (x > k + 1) x = k + 1;
  cout << x + k;
}
