You have a grid with n rows and n columns. Each cell is either empty (denoted by '.') or blocked (denoted by 'X').

Two empty cells are directly connected if they share a side. Two cells (r1, c1) (located in the row r1 and column c1) and (r2, c2) are connected if there exists a sequence of empty cells that starts with (r1, c1), finishes with (r2, c2), and any two consecutive cells in this sequence are directly connected. A connected component is a set of empty cells such that any two cells in the component are connected, and there is no cell in this set that is connected to some cell not in this set.

Your friend Limak is a big grizzly bear. He is able to destroy any obstacles in some range. More precisely, you can choose a square of size k × k in the grid and Limak will transform all blocked cells there to empty ones. However, you can ask Limak to help only once.

The chosen square must be completely inside the grid. It's possible that Limak won't change anything because all cells are empty anyway.

You like big connected components. After Limak helps you, what is the maximum possible size of the biggest connected component in the grid?

Input

The first line of the input contains two integers n and k (1 ≤ k ≤ n ≤ 500) — the size of the grid and Limak's range, respectively.

Each of the next n lines contains a string with n characters, denoting the i-th row of the grid. Each character is '.' or 'X', denoting an empty cell or a blocked one, respectively.

Output

Print the maximum possible size (the number of cells) of the biggest connected component, after using Limak's help.

Examples

Input

5 2
..XXX
XX.XX
X.XXX
X...X
XXXX.


Output

10


Input

5 3
.....
.XXX.
.XXX.
.XXX.
.....


Output

25

Note

In the first sample, you can choose a square of size 2 × 2. It's optimal to choose a square in the red frame on the left drawing below. Then, you will get a connected component with 10 cells, marked blue in the right drawing.

<image>
// package codeforces.cf3xx.cf356.div1;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;

/**
 * Created by hama_du on 2016/12/15.
 */
public class C {

    private static int[] dx = new int[]{0, -1, 0, 1};
    private static int[] dy = new int[]{-1, 0, 1, 0};

    public static void main(String[] args) {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = in.nextInt();
        int m = in.nextInt();
        int[][] field = new int[n][n];
        for (int i = 0; i < n ; i++) {
            char[] c = in.nextToken().toCharArray();
            for (int j = 0; j < n ; j++) {
                field[i][j] = c[j] == 'X' ? 1 : 0;
            }
        }

        int[][] imos = new int[n+1][n+1];
        for (int i = 0; i < n ; i++) {
            for (int j = 0; j < n ; j++) {
                imos[i+1][j+1] = imos[i+1][j] + imos[i][j+1] - imos[i][j] + field[i][j];
            }
        }

        UnionFind uf = new UnionFind(n*n);
        for (int i = 0; i < n ; i++) {
            for (int j = 0; j < n ; j++) {
                if (field[i][j] == 1) {
                    continue;
                }
                for (int d = 0; d < 4 ; d++) {
                    int ti = i+dy[d];
                    int tj = j+dx[d];
                    if (ti < 0 || tj < 0 || ti >= n || tj >= n || field[ti][tj] == 1) {
                        continue;
                    }
                    uf.unite(i*n+j, ti*n+tj);
                }
            }
        }

        id = new int[n][n];
        count = new int[n*n];
        for (int i = 0; i < n ; i++) {
            for (int j = 0; j < n ; j++) {
                if (field[i][j] == 1) {
                    id[i][j] = -1;
                    continue;
                }
                int x = uf.find(i*n+j);
                id[i][j] = x;
                count[x] = uf.groupCount(x);
            }
        }

        memo = new int[n*n];
        int max = 0;
        for (int i = 0 ; i+m <= n ; i++) {
            Arrays.fill(memo, 0);
            ans = 0;

            for (int j = 0; j < m ; j++) {
                for (int k = 0; k < m ; k++) {
                    push(i+j, k);
                }
            }

            for (int j = 0; j < m ; j++) {
                // up
                if (i-1 >= 0) {
                    push(i-1, j);
                }
                // dw
                if (i+m < n) {
                    push(i+m, j);
                }
                // rg
                if (m < n) {
                    push(i+j, m);
                }
            }

            for (int j = 0; j+m <= n ; j++) {
                int to = ans + imos[i+m][j+m] - imos[i][j+m] - imos[i+m][j] + imos[i][j];
                max = Math.max(max, to);

                // remove
                if (j >= 1) {
                    for (int k = 0; k < m ; k++) {
                        pop(i+k, j-1);
                    }
                }
                if (i-1 >= 0) {
                    pop(i-1, j);
                }
                if (i+m < n) {
                    pop(i+m, j);
                }

                // add
                if (j+m < n) {
                    if (i-1 >= 0) {
                        push(i-1, j+m);
                    }
                    if (i+m < n) {
                        push(i+m, j+m);
                    }
                }
                if (j+m+1 < n) {
                    for (int k = 0; k < m; k++) {
                        push(i+k, m+j+1);
                    }
                }
            }
        }

        out.println(max);
        out.flush();
    }

    static int ans;


    static int[][] id;
    static int[] count;
    static int[] memo;

    static void push(int i, int j) {
        int d = id[i][j];
        if (d == -1) {
            return;
        }
        if (memo[d] == 0) {
            ans += count[d];
        }
        memo[d]++;
    }


    static void pop(int i, int j) {
        int d = id[i][j];
        if (d == -1) {
            return;
        }
        if (memo[d] == 1) {
            ans -= count[d];
        }
        memo[d]--;
    }

    static class UnionFind {
        int[] rank;
        int[] parent;
        int[] cnt;

        public UnionFind(int n) {
            rank = new int[n];
            parent = new int[n];
            cnt = new int[n];
            for (int i = 0; i < n ; i++) {
                parent[i] = i;
                cnt[i] = 1;
            }
        }

        public int find(int a) {
            if (parent[a] == a) {
                return a;
            }
            parent[a] = find(parent[a]);
            return parent[a];
        }

        public void unite(int a, int b) {
            a = find(a);
            b = find(b);
            if (a == b) {
                return;
            }
            if (rank[a] < rank[b]) {
                parent[a] = b;
                cnt[b] += cnt[a];
                cnt[a] = cnt[b];
            } else {
                parent[b] = a;
                cnt[a] += cnt[b];
                cnt[b] = cnt[a];
                if (rank[a] == rank[b]) {
                    rank[a]++;
                }
            }
        }

        public int groupCount(int a) {
            return cnt[find(a)];
        }

        private boolean issame(int a, int b) {
            return find(a) == find(b);
        }
    }


    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int[] nextInts(int n) {
            int[] ret = new int[n];
            for (int i = 0; i < n; i++) {
                ret[i] = nextInt();
            }
            return ret;
        }


        private int[][] nextIntTable(int n, int m) {
            int[][] ret = new int[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    ret[i][j] = nextInt();
                }
            }
            return ret;
        }

        private long[] nextLongs(int n) {
            long[] ret = new long[n];
            for (int i = 0; i < n; i++) {
                ret[i] = nextLong();
            }
            return ret;
        }

        private long[][] nextLongTable(int n, int m) {
            long[][] ret = new long[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    ret[i][j] = nextLong();
                }
            }
            return ret;
        }

        private double[] nextDoubles(int n) {
            double[] ret = new double[n];
            for (int i = 0; i < n; i++) {
                ret[i] = nextDouble();
            }
            return ret;
        }

        private int next() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public char nextChar() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            if ('a' <= c && c <= 'z') {
                return (char) c;
            }
            if ('A' <= c && c <= 'Z') {
                return (char) c;
            }
            throw new InputMismatchException();
        }

        public String nextToken() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            StringBuilder res = new StringBuilder();
            do {
                res.append((char) c);
                c = next();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public int nextInt() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = next();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = next();
            while (isSpaceChar(c))
                c = next();
            long sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = next();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = next();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public double nextDouble() {
            return Double.valueOf(nextToken());
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static void debug(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }
}
