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