Megagon number | Function to find the nth Megagon Number ; Driver Code
def MegagonNum ( n ) : NEW_LINE INDENT return ( 999998 * n * n - 999996 * n ) // 2 ; NEW_LINE DEDENT n = 3 ; NEW_LINE print ( MegagonNum ( n ) ) ; NEW_LINE