/*
 * taete.cpp
 *
 *  Created on: 2018/04/26
 *      Author: J01003
 */
#include<iostream>
using namespace std;

int main(){

	int a,b,c,d;

	while(1){
		cin>>a>>b>>c;
		if(a%c=0){
			d++;
		}
		a++;
		if(a>b)return 0;
	

	}

	return 0;
}





