module practiceA
   sub Main(ByVal args() as String)
     dim x,a,b as integer
     dim ret as integer
 dim num as integer
     x=Console.ReadLine()
 a=Console.ReadLine()
 b=Console.ReadLine()
 
 Dim test As Double = Math.Floor((x - a) / b)
 Dim test2 As Integer = CType(test , Integer)
 ret = (x - a) - test2 * b
     Console.WriteLine(ret)
   end sub
 end module