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 "#".
nr, nc, mnw, mxw = list(map(int, input().strip().split()))
white = [0] * nc
c2i = {'.': 1, '#': 0}
for ir in range(nr):
  row = list(map(lambda x: c2i[x], input().strip()))
  for ic, v in enumerate(row):
    white[ic] += v
dpw, dpb = [0] * (nc + 1), [0] * (nc + 1)
inf = float('inf')
for ic in range(mnw - 1):
  dpw[ic] = dpb[ic] = inf
for ic in range(mnw - 1, nc):
  cw, cb = 0, 0
  for jc in range(ic - mnw + 1, ic + 1):
    cw, cb = cw + (nr - white[jc]), cb + white[jc]
  dpw[ic], dpb[ic] = cw + dpb[ic - mnw], cb + dpw[ic - mnw]
  for jc in range(max(ic - mxw + 1, 0), ic - mnw + 1)[::-1]:
    cw, cb = cw + (nr - white[jc]), cb + white[jc]
    dpw[ic], dpb[ic] = (min(dpw[ic],
                            cw + dpb[jc - 1]), min(dpb[ic], cb + dpw[jc - 1]))
# print(dpw, dpb)
print(min(dpw[nc - 1], dpb[nc - 1]))
