#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  scanf("%I64d", &n);
  long long one = n - 1;
  one = one / 3;
  long long ans1 = one + (one + 1);
  long long two = n / 3;
  long long ans2 = two + two;
  long long mainans = max(ans1, ans2);
  printf("%I64d\n", mainans);
  return 0;
}
