ll @c,k=0,a,b,n,x,e;rep(a,10)rep(b,10){n=max(a,b);x=999999999;while(x-n>1){e=(n+x)/2;if(c*(a*e+b)>e*e-1)n=e;else x=e;}if(a!=b)k+=n-max(a,b);}wt(k);