A "match" is defined as a string of length $L$ where each character is either '0' or '1'. We are given $N$ such "matches", and we want to design a "scheme", which is also a string of length $L$ consisting of '0's and '1's. The error value of a "match" is defined as the number of positions where the "scheme" and the "match" differ. For example, if the "match" is 101 and the "scheme" is 000, the first and third positions differ, so the error value for this "match" is 2. We want to find a "scheme" such that the sum of the error values for all $N$ "matches" is minimized. Additionally, there are $M$ distinct forbidden "schemes", and the "scheme" we choose must not be one of these forbidden "schemes".
Input
The first line contains three positive integers $N, M, L$, where $1 \le N \le 1000$, $1 \le M \le \min(1000, 2^L-1)$, and $1 \le L \le 1000$.
The next $N$ lines each contain a string of length $L$, followed by $M$ lines, each containing a string of length $L$.
Output
Output a single integer representing the minimum sum of error values for the $N$ "matches" using a valid "scheme".
Examples
Input 1
4 1 4
0000
1000
1100
1010
1000
Output 1
5
Input 2
2 4 4
0000
0000
0000
1000
0100
0010
Output 2
2