#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <locale.h>


int main(){
	setlocale(LC_ALL, "rus");
	system("color 2");
	int i = 0, a, b, c, p;
	int x = 0, n = 4, count = 1;
	while(x < 60){
		i = i + n;
		if(i >= 1000){
			i = i - 1000;
			count = count + 10;
			n = n + 4 * 10;
		}
		if(i >= 900){
			i = i - 900;
			count = count + 9;
			n = n + 4 * 9;
		}
		if(i >= 800){
			i = i - 800;
			count = count + 8;
			n = n + 4 * 8;
		}
		if(i >= 700){
			i = i - 700;
			count = count + 7;
			n = n + 4 * 7;
		}
		if(i >= 600){
			i = i - 600;
			count = count + 6;
			n = n + 4 * 6;
		}
		if(i >= 500){
			i = i - 500;
			count = count + 5;
			n = n + 4 * 5;
		}
		if(i >= 400){
			i = i - 400;
			count = count + 4;
			n = n + 4 * 4;
		}
		if(i >= 300){
			i = i - 300;
			count = count + 3;
			n = n + 4 * 3;
		}
		if(i >= 200){
			i = i - 200;
			count = count + 2;
			n = n + 4 * 2;
		}
		if(i >= 100){
			i = i - 100;
			count = count + 1;
			n = n + 4 * 1;
		}
		x = x + 1;
		printf("%d)  Число машин = %d\n", x, count);
	}
	printf("Число машин равно %d", count);
}


