You've got an *n* × *m* pixel picture. Each pixel can be white or black. Your task is to change the colors of as few pixels as possible to obtain a barcode picture.

A picture is a barcode if the following conditions are fulfilled: 
 -  All pixels in each column are of the same color. -  The width of each monochrome vertical line is at least *x* and at most *y* pixels. In other words, if we group all neighbouring columns of the pixels with equal color, the size of each group can not be less than *x* or greater than *y*.
The first line contains four space-separated integers *n*, *m*, *x* and *y* (1 ≤ *n*, *m*, *x*, *y* ≤ 1000; *x* ≤ *y*).

Then follow *n* lines, describing the original image. Each of these lines contains exactly *m* characters. Character "." represents a white pixel and "#" represents a black pixel. The picture description doesn't have any other characters besides "." and "#".
a=[int(i) for i in input().split()]
b=[0]*a[1]
for i in range(0,a[0]):
	c=input()
	for p in range(0,a[1]):
		if c[p]=='#':
			b[p]+=1
#print("b:",b)

n={1:a[0]-b[0]} #Negras{Seguidas, Cambios}
w={1:b[0]} #White={Seguidas, Cambios}

for i in range(2,a[1]+1):
	#print("i:",i)
	h=min([w[y] for y in w][a[2]-1:])+a[0]-b[i-1]
	j=min([n[y] for y in n][a[2]-1:])+b[i-1]
	if i>=a[3]:
		l=a[3]
		#print("i:",i,"a[3]:",a[3])
		#print("entra")
	else:
		l=i
	for z in range(l,1,-1):
		#print("n:",n)
		#print("w:",w)
		#print("a:",a)
		#print("b:",b)
		#print("z:",z)
		n[z]=n[z-1]+a[0]-b[i-1]
		w[z]=w[z-1]+b[i-1]
	n[1]=h
	w[1]=j

#print(n)
#print(w)
print(min([n[i] for i in n][a[2]-2:]+[w[i] for i in w][a[2]-2:]))
	 			 	    				 	 	   			 		