protocol InitFromString {
    init?(_ str: String)
}

extension Int: InitFromString {}
extension Int8: InitFromString {}
extension Int16: InitFromString {}
extension Int32: InitFromString {}
extension Int64: InitFromString {}
extension String: InitFromString {}

func input<T: InitFromString>() -> [T] {
    readLine()!.split(separator: " ").map(String.init).compactMap(T.init)
}

let inputLine: [Int] = input()
let count = (inputLine[0]...inputLine[1]).reduce(into: 0) { (result, i) in
    if i % inputLine[2] == 0 {
        result += 1
    }
}

print(count)
