#include using namespace std; int main(int argc, const char * argv[]) { int n;cin>>n; if(n==4)cout<<3<=n%7)cout<<7<