#include using namespace std; int main() { int n; cin >> n; int i=0; while(n%3!=0) { i++; if((n-2*i)%3==0) break; } cout << i << endl; }