#include using namespace std; int n, nr; int main() { cin >> n; nr = (9*n-6)/2; if ( n % 2 == 1 ) nr += 2; cout << nr; return 0; }