Module Module1

    Sub Main()

        Dim n As Integer
        n = CInt(Console.ReadLine())

        Dim nStart = 1

        Dim ii As Integer
        For ii = 1 To n
            nStart = (nStart * ii) Mod (10 ^ 9 + 7)
        Next


        Console.WriteLine(nStart)

    End Sub

End Module