#include using namespace std; int main(){ int n; cin >> n; cout << 7 * n - 3 << endl; return 0; }