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