#include <iostream>
using namespace std;
int main( void )
{
	int n;
	while ( cin >> n )
	{
		if ( n > 2 )
			cout << 2 * n + 1 + 2 * ( n - 3 ) << endl;
		else
			cout << 2 * n << endl;
	}
	return 0;
}