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