#include using namespace std; int main(void){ int n; cin >> n; int a = n/3, m; if (n%3 == 1) { m = 3*(a - 1)+1; } else m = n % 3; cout << m/2 << endl; }