adouble x[100],y[100],t,u,s;n,i,j,k,c;main(m){for(;m=scanf("%d",&n),i=n;printf("%d\n",m)){for(;i--;scanf("%lf,%lf",x+i,y+i));for(i=n;j=--i;)for(;j--;)if(s=(u=acos(hypot(x[j]-x[i],y[j]-y[i])/2))<9)for(t=atan2(y[j]-y[i],x[j]-x[i]);c=0,s+3;s-=2)for(k=n;k--;)hypot(x[i]+cos(t+s*u)-x[k],y[i]+sin(t+s*u)-y[k])<1.1&&++c>m?m=c:0;}}