using C=System.Console;class X{static void Main(){for(;;){string x=C.ReadLine(),s=x.Remove(0,2);for(int i=-1;(i+=s.Length/(x[0]-48)+1)