Imports System
Public Module Module1
Public Sub Main()
Dim N ,S ,d1, d2, d3 as Integer
Console.WriteLine(" Enter a number between 0 and 1000 ")
N = console.ReadLine()
S = 0
d1 = N Mod 10
N = math.Floor (N/10)
d2 = N Mod 10
d3 = N Mod 10
S = d1 + d2 + d3
Console.WriteLine(S)
End Sub
End Module