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