#include using namespace std; int main() { int N; cin >> N; if(N <= 6) { cout << N << endl; return 0; } cout << 6+(N-6)*7 << endl; }