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>
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.io.Closeable;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) throws Exception {
        Thread thread = new Thread(null, new TaskAdapter(), "", 1 << 29);
        thread.start();
        thread.join();
    }

    static class TaskAdapter implements Runnable {
        @Override
        public void run() {
            InputStream inputStream = System.in;
            OutputStream outputStream = System.out;
            FastInput in = new FastInput(inputStream);
            FastOutput out = new FastOutput(outputStream);
            CBearAndSquareGrid solver = new CBearAndSquareGrid();
            solver.solve(1, in, out);
            out.close();
        }
    }

    static class CBearAndSquareGrid {
        boolean[][] visited;
        int k;
        int ans;
        int sum;
        int[] conn;
        int b;
        int t;
        int l;
        int r;
        int n;
        int[][] mat;
        int[][] cc;
        int[] size;
        int[][] ps;

        public void solve(int testNumber, FastInput in, FastOutput out) {
            n = in.readInt();
            k = in.readInt();
            mat = new int[n + 2][n + 2];
            for (int i = 1; i <= n; i++) {
                for (int j = 1; j <= n; j++) {
                    mat[i][j] = in.readChar() == '.' ? 0 : 1;
                }
            }
            ps = new int[n + 2][n + 2];
            for (int i = 1; i <= n; i++) {
                for (int j = 1; j <= n; j++) {
                    ps[i][j] = mat[i][j];
                    ps[i][j] += ps[i][j - 1];
                }
                for (int j = 1; j <= n; j++) {
                    ps[i][j] += ps[i - 1][j];
                }
            }

            cc = new int[n + 2][n + 2];
            size = new int[(n + 2) * (n + 2) + 1];
            SequenceUtils.deepFill(cc, 0);
            int order = 1;
            for (int i = 1; i <= n; i++) {
                for (int j = 1; j <= n; j++) {
                    if (mat[i][j] == 0 && cc[i][j] == 0) {
                        size[order] = dfs(i, j, order);
                        order++;
                    }
                }
            }
            conn = new int[order];
            visited = new boolean[n + 2][n + 2];

            for (int i = 0; i <= k + 1; i++) {
                for (int j = 0; j <= k + 1; j++) {
                    add(i, j, 1);
                }
            }
            l = 0;
            r = k + 1;
            b = 0;
            t = k + 1;

            dfsForMove();

            out.println(ans);
        }

        public void dfsForMove() {
            visited[b][l] = true;
            update();
            if (t + 1 <= n + 1 && !visited[b + 1][l]) {
                moveDown();
            } else if (r + 1 <= n + 1 && !visited[b][l + 1]) {
                moveRight();
            } else if (b - 1 >= 0 && !visited[b - 1][l]) {
                moveUp();
            } else if (l - 1 >= 0 && !visited[b][l - 1]) {
                moveLeft();
            } else {
                return;
            }
            dfsForMove();
        }

        public void update() {
            add(b, l, -1);
            add(t, l, -1);
            add(b, r, -1);
            add(t, r, -1);

            int cand = sum + region(b + 1, t - 1, l + 1, r - 1);
            ans = Math.max(ans, cand);


            add(b, l, 1);
            add(t, l, 1);
            add(b, r, 1);
            add(t, r, 1);
        }

        public void moveDown() {
            for (int i = l; i <= r; i++) {
                add(b, i, -1);
                add(t + 1, i, 1);
            }
            b++;
            t++;
        }

        public void moveUp() {
            for (int i = l; i <= r; i++) {
                add(b - 1, i, 1);
                add(t, i, -1);
            }
            b--;
            t--;
        }

        public void moveRight() {
            for (int i = b; i <= t; i++) {
                add(i, l, -1);
                add(i, r + 1, 1);
            }
            l++;
            r++;
        }

        public void moveLeft() {
            for (int i = b; i <= t; i++) {
                add(i, l - 1, 1);
                add(i, r, -1);
            }
            l--;
            r--;
        }

        public boolean check(int i, int j) {
            return !(i < 1 || j < 1 || i > n || j > n);
        }

        public void add(int i, int j, int x) {
            int id = cc[i][j];
            if (conn[id] == 0) {
                sum += size[id];
            }
            conn[id] += x;
            if (conn[id] == 0) {
                sum -= size[id];
            }
        }

        public int region(int b, int t, int l, int r) {
            int ans = ps[t][r];
            if (l > 0) {
                ans -= ps[t][l - 1];
            }
            if (b > 0) {
                ans -= ps[b - 1][r];
            }
            if (l > 0 && b > 0) {
                ans += ps[b - 1][l - 1];
            }
            return ans;
        }

        public int dfs(int i, int j, int id) {
            if (!check(i, j) || mat[i][j] == 1 || cc[i][j] != 0) {
                return 0;
            }
            cc[i][j] = id;
            return dfs(i + 1, j, id) + dfs(i - 1, j, id) + dfs(i, j - 1, id) + dfs(i, j + 1, id) + 1;
        }

    }

    static class FastOutput implements AutoCloseable, Closeable, Appendable {
        private StringBuilder cache = new StringBuilder(10 << 20);
        private final Writer os;

        public FastOutput append(CharSequence csq) {
            cache.append(csq);
            return this;
        }

        public FastOutput append(CharSequence csq, int start, int end) {
            cache.append(csq, start, end);
            return this;
        }

        public FastOutput(Writer os) {
            this.os = os;
        }

        public FastOutput(OutputStream os) {
            this(new OutputStreamWriter(os));
        }

        public FastOutput append(char c) {
            cache.append(c);
            return this;
        }

        public FastOutput append(int c) {
            cache.append(c);
            return this;
        }

        public FastOutput println(int c) {
            return append(c).println();
        }

        public FastOutput println() {
            cache.append(System.lineSeparator());
            return this;
        }

        public FastOutput flush() {
            try {
                os.append(cache);
                os.flush();
                cache.setLength(0);
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
            return this;
        }

        public void close() {
            flush();
            try {
                os.close();
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
        }

        public String toString() {
            return cache.toString();
        }

    }

    static class SequenceUtils {
        public static void deepFill(Object array, int val) {
            if (!array.getClass().isArray()) {
                throw new IllegalArgumentException();
            }
            if (array instanceof int[]) {
                int[] intArray = (int[]) array;
                Arrays.fill(intArray, val);
            } else {
                Object[] objArray = (Object[]) array;
                for (Object obj : objArray) {
                    deepFill(obj, val);
                }
            }
        }

    }

    static class FastInput {
        private final InputStream is;
        private byte[] buf = new byte[1 << 13];
        private int bufLen;
        private int bufOffset;
        private int next;

        public FastInput(InputStream is) {
            this.is = is;
        }

        private int read() {
            while (bufLen == bufOffset) {
                bufOffset = 0;
                try {
                    bufLen = is.read(buf);
                } catch (IOException e) {
                    bufLen = -1;
                }
                if (bufLen == -1) {
                    return -1;
                }
            }
            return buf[bufOffset++];
        }

        public void skipBlank() {
            while (next >= 0 && next <= 32) {
                next = read();
            }
        }

        public int readInt() {
            int sign = 1;

            skipBlank();
            if (next == '+' || next == '-') {
                sign = next == '+' ? 1 : -1;
                next = read();
            }

            int val = 0;
            if (sign == 1) {
                while (next >= '0' && next <= '9') {
                    val = val * 10 + next - '0';
                    next = read();
                }
            } else {
                while (next >= '0' && next <= '9') {
                    val = val * 10 - next + '0';
                    next = read();
                }
            }

            return val;
        }

        public char readChar() {
            skipBlank();
            char c = (char) next;
            next = read();
            return c;
        }

    }
}

