#include using namespace std; int N = 3; vector V = { 1, 3, 4 }; int LeiaKogus(int S) { if (S < 0) return INT16_MAX; if (S == 0) return 0; else { int vastus = INT16_MAX; for (int i = 0; i < N; i++) { vastus = min(vastus, 1 + LeiaKogus(S - V[i])); } return vastus; } } int main() { int S; cin >> S; cout << LeiaKogus(S) << endl; return 0; }