const total = readline() const min = 2 const max = ( 3 * ( total -1 ) ) + 2 const res = ( min + max ) * total / 2 print( res )
const total = readline() const min = 2 const max = ( 3 * ( total -1 ) ) + 2 const res = ( min + max ) * total / 2 print( res )