Imports System

Module Program
    Sub Main(args As String())
        Dim iInput As Integer = Console.ReadLine()
        Console.WriteLine(iInput + (iInput ^ 2) + (iInput ^ 3))
    End Sub
End Module
