func main() var ss: [][]char :: cui@input().split(" ") var L: int :: ss[0].toInt(&) var R: int :: ss[1].toInt(&) var M: int :: ss[2].toInt(&) var dic: dict :: #dict var ans: int for i(L, R) var n: int :: i % M if(!dic.exist(n)) do dic.add(n, 1) do ans :+ 1 end if end for do cui@print("\{ans}\n") end func