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 baobab;

import java.io.*;
import java.util.*;

public class E {

    public static void main(String[] args) {
        EIO io = new EIO();
        try {
            Esolver solver = new Esolver(io);
            solver.solve();
        } finally {
            io.close();
        }
    }

}

class Esolver {
    EIO io;

    public Esolver(EIO io) {
        this.io = io;
    }

    static final int UP = 0;
    static final int RIGHT = 1;
    static final int DOWN = 2;
    static final int LEFT = 3;


    public void solve() {
        int n = io.nextInt();
        int k = io.nextInt();
        boolean[][] graph = new boolean[n][n];
        for (int i=0; i<n; i++) {
            String row = io.next();
            for (int j=0; j<row.length(); j++) {
                char c = row.charAt(j);
                graph[i][j] = (c != 'X');
            }
        }
        int largestComponentSize = 0;
        int[] componentSizes = new int[n*n + 2];
        int currentComponent = 1;
        int[][] ofComponent = new int[n][n];
        boolean[][] visited = new boolean[n][n];
        for (int y=0; y<n; y++) {
            for (int x=0; x<n; x++) {
                if (visited[y][x]) continue;
                if (!graph[y][x]) continue;
                ArrayDeque<Pair> q = new ArrayDeque<>();
                q.add(new Pair(y, x));
                int currentSize = 0;
                while (!q.isEmpty()) {
                    Pair curr = q.poll();
                    if (visited[curr.y][curr.x]) continue;
                    if (!graph[curr.y][curr.x]) continue; // X
                    visited[curr.y][curr.x] = true;
                    ofComponent[curr.y][curr.x] = currentComponent;
                    currentSize++;
                    if (curr.y - 1 >= 0) q.add(new Pair(curr.y - 1, curr.x));
                    if (curr.x - 1 >= 0) q.add(new Pair(curr.y, curr.x - 1));
                    if (curr.y + 1 < n) q.add(new Pair(curr.y + 1, curr.x));
                    if (curr.x + 1 < n) q.add(new Pair(curr.y, curr.x + 1));
                }
                componentSizes[currentComponent] = currentSize;
                largestComponentSize = Math.max(largestComponentSize, currentSize);
                currentComponent++;
            }
        }
        int[][][] marks = new int[n][n][4];
        for (int y=0; y<n; y++) {
            for (int x = 0; x < n; x++) {
                if (graph[y][x]) continue;
                // X
                if (y - 1 >= 0) marks[y][x][UP] = ofComponent[y-1][x];
                if (x - 1 >= 0) marks[y][x][LEFT] = ofComponent[y][x-1];
                if (y + 1 < n) marks[y][x][DOWN] = ofComponent[y+1][x];
                if (x + 1 < n) marks[y][x][RIGHT] = ofComponent[y][x+1];
            }
        }
        int maxScore = largestComponentSize;

        for (int y=k; y<=n; y++) {
            int score = 0;
            int[] slidingCount = new int[currentComponent];
            for (int j=y-k; j<y; j++) {
                for (int x=0; x<k; x++) {
                    if (graph[j][x]) continue;
                    score++;
                    for (int direction=0; direction<4; direction++) {
                        int component = marks[j][x][direction];
                        slidingCount[component]++;
                        if (slidingCount[component] == 1) {
                            score += componentSizes[component];
                        }
                    }
                }
            }
            maxScore = Math.max(score, maxScore);
            for (int x=k; x<n; x++) {
                for (int j=y-1; j>=y-k; j--) {
                    if (!graph[j][x-k]) {
                        score--;
                        for (int direction=0; direction<4; direction++) {
                            int component = marks[j][x-k][direction];
                            slidingCount[component]--;
                            if (slidingCount[component] == 0) {
                                score -= componentSizes[component];
                            }
                        }
                    }
                    if (!graph[j][x]) {
                        score++;
                        for (int direction=0; direction<4; direction++) {
                            int component = marks[j][x][direction];
                            slidingCount[component]++;
                            if (slidingCount[component] == 1) {
                                score += componentSizes[component];
                            }
                        }
                    }
                }
                maxScore = Math.max(score, maxScore);
            }
        }
        System.out.println(maxScore);
    }

    private static class Pair {
        int y;
        int x;

        public Pair(int y, int x) {
            this.y = y;
            this.x = x;
        }
    }

    private List<Integer>[] toGraph(EIO io, int n) {
        List<Integer>[] g = new ArrayList[n+1];
        for (int i=1; i<=n; i++) g[i] = new ArrayList<>();
        for (int i=1; i<=n-1; i++) {
            int a = io.nextInt();
            int b = io.nextInt();
            g[a].add(b);
            g[b].add(a);
        }
        return g;
    }
}

class EIO extends PrintWriter {
    private InputStreamReader r;
    private static final int BUFSIZE = 1 << 15;
    private char[] buf;
    private int bufc;
    private int bufi;
    private StringBuilder sb;

    public EIO() {
        super(new BufferedOutputStream(System.out));
        r = new InputStreamReader(System.in);

        buf = new char[BUFSIZE];
        bufc = 0;
        bufi = 0;
        sb = new StringBuilder();
    }

    private void fillBuf() throws IOException {
        bufi = 0;
        bufc = 0;
        while(bufc == 0) {
            bufc = r.read(buf, 0, BUFSIZE);
            if(bufc == -1) {
                bufc = 0;
                return;
            }
        }
    }

    private boolean pumpBuf() throws IOException {
        if(bufi == bufc) {
            fillBuf();
        }
        return bufc != 0;
    }

    private boolean isDelimiter(char c) {
        return c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f';
    }

    private void eatDelimiters() throws IOException {
        while(true) {
            if(bufi == bufc) {
                fillBuf();
                if(bufc == 0) throw new RuntimeException("IO: Out of input.");
            }

            if(!isDelimiter(buf[bufi])) break;
            ++bufi;
        }
    }

    public String next() {
        try {
            sb.setLength(0);

            eatDelimiters();
            int start = bufi;

            while(true) {
                if(bufi == bufc) {
                    sb.append(buf, start, bufi - start);
                    fillBuf();
                    start = 0;
                    if(bufc == 0) break;
                }

                if(isDelimiter(buf[bufi])) break;
                ++bufi;
            }

            sb.append(buf, start, bufi - start);

            return sb.toString();
        } catch(IOException e) {
            throw new RuntimeException("IO.next: Caught IOException.");
        }
    }

    public int nextInt() {
        try {
            int ret = 0;

            eatDelimiters();

            boolean positive = true;
            if(buf[bufi] == '-') {
                ++bufi;
                if(!pumpBuf()) throw new RuntimeException("IO.nextInt: Invalid int.");
                positive = false;
            }

            boolean first = true;
            while(true) {
                if(!pumpBuf()) break;
                if(isDelimiter(buf[bufi])) {
                    if(first) throw new RuntimeException("IO.nextInt: Invalid int.");
                    break;
                }
                first = false;

                if(buf[bufi] >= '0' && buf[bufi] <= '9') {
                    if(ret < -214748364) throw new RuntimeException("IO.nextInt: Invalid int.");
                    ret *= 10;
                    ret -= (int)(buf[bufi] - '0');
                    if(ret > 0) throw new RuntimeException("IO.nextInt: Invalid int.");
                } else {
                    throw new RuntimeException("IO.nextInt: Invalid int.");
                }

                ++bufi;
            }

            if(positive) {
                if(ret == -2147483648) throw new RuntimeException("IO.nextInt: Invalid int.");
                ret = -ret;
            }

            return ret;
        } catch(IOException e) {
            throw new RuntimeException("IO.nextInt: Caught IOException.");
        }
    }

    public long nextLong() {
        try {
            long ret = 0;

            eatDelimiters();

            boolean positive = true;
            if(buf[bufi] == '-') {
                ++bufi;
                if(!pumpBuf()) throw new RuntimeException("IO.nextLong: Invalid long.");
                positive = false;
            }

            boolean first = true;
            while(true) {
                if(!pumpBuf()) break;
                if(isDelimiter(buf[bufi])) {
                    if(first) throw new RuntimeException("IO.nextLong: Invalid long.");
                    break;
                }
                first = false;

                if(buf[bufi] >= '0' && buf[bufi] <= '9') {
                    if(ret < -922337203685477580L) throw new RuntimeException("IO.nextLong: Invalid long.");
                    ret *= 10;
                    ret -= (long)(buf[bufi] - '0');
                    if(ret > 0) throw new RuntimeException("IO.nextLong: Invalid long.");
                } else {
                    throw new RuntimeException("IO.nextLong: Invalid long.");
                }

                ++bufi;
            }

            if(positive) {
                if(ret == -9223372036854775808L) throw new RuntimeException("IO.nextLong: Invalid long.");
                ret = -ret;
            }

            return ret;
        } catch(IOException e) {
            throw new RuntimeException("IO.nextLong: Caught IOException.");
        }
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }

}