/** * @FileName a.cpp * @Author kanpurin * @Created 2020.10.15 17:41:03 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { string s;cin >> s; if (s == "4") { puts("3"); } else if (s == "6") { cout << 5 << endl; } else if (s == "8" || s == "9" || s == "10" || s == "15" || s == "16" || s == "22") { cout << 7 << endl; } else { cout << 8 << endl; } return 0; }