import java.util.*; public class Exercise148{ public static void main (String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); String s = sc.next(); String sumS = s; if(k > n){ for(int i = 1; i < (int)Math.ceil((double)k / (double)n); i++){ sumS += s; } } long p = 0; long g = 0; char[] sArray = sumS.toCharArray(); for(int i = 0; i < k; i++){ if(g > 0){ if(c(sArray[i]) > 0){ g += c(sArray[i]); } g--; }else{ if(c(sArray[i]) > 0){ g += c(sArray[i]); } p++; } } System.out.println(p); } private static int c(char ch){ return Character.getNumericValue(ch); } }