#include int persentage(int x,int y){ int r; r = x*1000/y; if(r % 10 >= 5){r = (r/10)+ 1;} else{r = r/10;} return r; } int main(void) { int a,b,mins=10000,ina,inb; scanf("%d%d",&ina,&inb); for(a = 0;a <= 1000;a++){ for(b = 0;b <= 1000;b++){ if(a == 0 && b == 0){continue;} if(ina == persentage(a,(a+b)) && inb == persentage(b,(a+b))){ if(mins > (a+b)){mins=a+b;} } } } printf("%d\n",mins); return 0; }