#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define loop(i,a,b) for(int i=a;i pii; typedef vector vi; typedef vector vvi; typedef vector vp; typedef vector vvp; typedef vector vs; typedef vector vd; typedef vector vvd; typedef pair pip; typedef vectorvip; const double PI=acos(-1); const double EPS=1e-7; const int inf=1e8; const ll INF=1e16; int dx[4]={0,1,0,-1}; int dy[4]={1,0,-1,0}; int main(){ int n,m; cin>>n>>m; int out=inf; rep(i,300)rep(j,300)if(i||j){ // (10*n-5)/10 <= 100*a/(a+b) < (10*n+5)/10 if((10*n-5)*(i+j)<=1000*i&&1000*i<(i+j)*(10*n+5)&& (10*m-5)*(i+j)<=1000*j&&1000*j<(i+j)*(10*m+5))out=min(out,i+j); } cout<