Module Module1

    Sub Main()
        Dim input As String = Console.ReadLine()
        Dim output As String = ""
        If input(0) = "1" Then
            output = output & "9"
        Else
            output = output & "1"
        End If
        If input(1) = "1" Then
            output = output & "9"
        Else
            output = output & "1"
        End If
        If input(2) = "1" Then
            output = output & "9"
        Else
            output = output & "1"
        End If
        Console.WriteLine(output)
    End Sub

End Module
