>>107127605
#include <stdio.h>
#define MAX_GEARS 50
int main(){
int gearTeethIn[MAX_GEARS-1] = {0}, gearTeethOut[MAX_GEARS-1] = {0};
double rot = 100;
scanf(" %d", &gearTeethOut[0]);
for(int i = 1; i < MAX_GEARS-1 && scanf(" %d|%d", &gearTeethIn[i-1], &gearTeethOut[i]) != EOF; i++);
scanf(" %d", &gearTeethIn[MAX_GEARS-2]);
for(int i = 0; i < MAX_GEARS-1; i++) rot = (gearTeethOut[i]*rot)/gearTeethIn[i];
printf("%ld\n", (long)rot);
}
part 3 code in c :)