#include<bits/stdc++.h>
using namespace std;
int V;
int main(){
    cin>> V;
    if((V<10)and((V==9)or(V==8))){cout << 3<< endl;}
         else{if((V<10)and((V==7)or(V==6)or(V==4)or(V==3))){cout << 2<<endl;}
              else {if((V<10)and((V==5)or (V==2)or(V==1))){cout << 1<<endl;}
                    else{if((V<10)and(V==0)){cout << 0<<endl;}

                        }

                   }
             }
return 0;
}