Ivan is a student at Berland State University (BSU). There are *n* days in Berland week, and each of these days Ivan might have some classes at the university.

There are *m* working hours during each Berland day, and each lesson at the university lasts exactly one hour. If at some day Ivan's first lesson is during *i*-th hour, and last lesson is during *j*-th hour, then he spends *j* - *i* + 1 hours in the university during this day. If there are no lessons during some day, then Ivan stays at home and therefore spends 0 hours in the university.

Ivan doesn't like to spend a lot of time in the university, so he has decided to skip some lessons. He cannot skip more than *k* lessons during the week. After deciding which lessons he should skip and which he should attend, every day Ivan will enter the university right before the start of the first lesson he does not skip, and leave it after the end of the last lesson he decides to attend. If Ivan skips all lessons during some day, he doesn't go to the university that day at all.

Given *n*, *m*, *k* and Ivan's timetable, can you determine the minimum number of hours he has to spend in the university during one week, if he cannot skip more than *k* lessons?
The first line contains three integers *n*, *m* and *k* (1 ≤ *n*, *m* ≤ 500, 0 ≤ *k* ≤ 500) — the number of days in the Berland week, the number of working hours during each day, and the number of lessons Ivan can skip, respectively.

Then *n* lines follow, *i*-th line containing a binary string of *m* characters. If *j*-th character in *i*-th line is 1, then Ivan has a lesson on *i*-th day during *j*-th hour (if it is 0, there is no such lesson).
In the first example Ivan can skip any of two lessons during the first day, so he spends 1 hour during the first day and 4 hours during the second day.

In the second example Ivan can't skip any lessons, so he spends 4 hours every day.
2 5 1
01001
10110
5
2 5 0
01001
10110
8
3 4 0
0000
0000
0000
0
3 4 12
1111
1111
1111
0
3 4 6
1111
1111
1111
6
10 10 0
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
100
10 10 5
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
55
10 10 10
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
10
10 10 20
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
0
10 10 19
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1
4 16 11
1111011101111111
0111110111111111
0011101111011000
0000010000001000
30
1 1 5
1
0
4 113 370
01110100100010110100110000000011001111110000100111111001011001110111110111001011010110000110110010101010110001000
01101001111110001010001100101100111100111001001001001101110101100110110110001110100010111011101011101110011110100
01100110001001111010000010101100111100011111010000101010011011111111000111111001001010110110011011111110110010111
11100111000100010000100111010101110110100101100100001111000001001010001000101110011100101011101100011010111010000
0
3 3 4
000
000
000
0
1 5 1
10001
1
1 1 1
0
0
10 10 100
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
1000000001
0
5 1 6
1
1
1
0
1
0
1 1 1
1
0
8 4 8
0001
0010
0100
0000
1001
1101
0010
0001
2
1 1 2
1
0
1 1 0
1
1
1 1 2
0
0
I,G=input,range;n,m,k=map(int,I().split());t=[[]for i in G(n)];tot=0
for i in G(n):
  for j,c in enumerate(I()):
    if c=='1':t[i]+=[j];tot+=1
k=min(k,tot);inf=float('inf');f=[inf]*(k+1)
for i in G(n):
  r=t[i];n1=len(r);cur=[inf]*(k+1)
  for j in G(k+1):
    for p in G(min(j,n1)+1):#skip first or last p lessons
      on1=on2=0;pre=[f[j-p],0][i==0]
      if n1 and p<n1:x=(p!=n1);on1,on2=r[-1]-r[p]+x,r[n1-p-1]-r[0]+x
      cur[j]=min(cur[j], on1+pre, on2+pre)
  cur,f=f,cur
print(f[k])