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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;

/**
 * Created by birukoudzmitry on 12.06.16.
 */


public class E {

    public static void main(String[] args){

        MyScanner in = new MyScanner();
        int n = in.nextInt();
        int k = in.nextInt();

        DisjointUnionSets dsu = new DisjointUnionSets(n*n);
        Set<Integer> used = new HashSet<>(2*k);


        String[] field = new String[n];
        for(int i=0;i<n;++i){
            field[i] = in.next();
        }

        for(int i=0;i<n;++i){
            for(int j=0;j<n;++j){
                if(field[i].charAt(j)=='.'){
                    if(i>0&&field[i-1].charAt(j)=='.'){
                        dsu.union(i*n+j,(i-1)*n+j);
                    }
                    if(j>0&&field[i].charAt(j-1)=='.'){
                        dsu.union(i*n+j,i*n+j-1);
                    }
                }
            }
        }

        int result = 0;

        int[] components = new int[n*n];

        int dots = 0;
        int except = 0;

        for(int i=0;i<=n-k;++i){
            int startJ = 0;
            int inc = 1;
            if(i%2==1){
                startJ = n-k;
                inc = -1;
            }
            for(int j=startJ;(i%2==1&&j>=0)||(i%2==0&&j<=n-k);j+=inc){

                int allDots = 0;
                used.clear();

                for(int i1=i;i1<i+k;i1++){
                    if(j-1>=0&&field[i1].charAt(j-1)=='.'){
                        allDots+=getDots(used,dsu,i1*n+j-1);
                    }
                    if(j+k<n&&field[i1].charAt(j+k)=='.'){
                        allDots+=getDots(used,dsu,i1*n+j+k);
                    }
                }

                for(int j1=j;j1<j+k;j1++){
                    if(i-1>=0&&field[i-1].charAt(j1)=='.'){
                        allDots+=getDots(used,dsu,(i-1)*n+j1);
                    }
                    if(i+k<n&&field[i+k].charAt(j1)=='.'){
                        allDots+=getDots(used,dsu,(i+k)*n+j1);
                    }
                }

                if(i==0&&j==0){
                    for(int i1=i;i1<i+k;i1++){
                        for(int j1=j;j1<j+k;j1++){
                            if(field[i1].charAt(j1)=='.'){
                                components[dsu.find(i1*n+j1)]++;
                                dots++;
                                if(components[dsu.find(i1*n+j1)]==dsu.size[dsu.find(i1*n+j1)]){
                                    except+=components[dsu.find(i1*n+j1)];
                                }
                            }
                        }
                    }
                }else{
                    int newDots = 0;
                    int oldDots = 0;
                    if(j==startJ){
                        for(int j1=j;j1<j+k;++j1){
                            if(field[i-1].charAt(j1)=='.'){
                                if(components[dsu.find((i-1)*n+j1)]==dsu.size[dsu.find((i-1)*n+j1)]){
                                    except-=dsu.size[dsu.find((i-1)*n+j1)];
                                }
                                components[dsu.find((i-1)*n+j1)]--;
                                oldDots++;
                            }
                        }
                        for(int j1=j;j1<j+k;++j1){
                            if(field[i+k-1].charAt(j1)=='.'){
                                components[dsu.find((i+k-1)*n+j1)]++;
                                if(components[dsu.find((i+k-1)*n+j1)]==dsu.size[dsu.find((i+k-1)*n+j1)]){
                                    except+=components[dsu.find((i+k-1)*n+j1)];
                                }
                                newDots++;
                            }
                        }
                    }else{
                        int prev = j-1;
                        int next = j+k-1;
                        if(i%2==1){
                            prev = j+k;
                            next = j;
                        }
                        for(int i1=i;i1<i+k;++i1){

                            if(field[i1].charAt(prev)=='.'){
                                if(components[dsu.find(i1*n+prev)]==dsu.size[dsu.find(i1*n+prev)]){
                                    except-=dsu.size[dsu.find(i1*n+prev)];
                                }
                                components[dsu.find(i1*n+prev)]--;
                                oldDots++;
                            }
                        }
                        for(int i1=i;i1<i+k;++i1){
                            if(field[i1].charAt(next)=='.'){
                                components[dsu.find(i1*n+next)]++;
                                if(components[dsu.find(i1*n+next)]==dsu.size[dsu.find(i1*n+next)]){
                                    except+=components[dsu.find(i1*n+next)];
                                }
                                newDots++;
                            }
                        }
                    }
                    dots+=(newDots-oldDots);
                }

//                if(allDots+k*k-dots+except>result){
//                    System.out.println(i+" , "+j);
//                    System.out.println(allDots+k*k-dots+except);
//                }
//                System.out.println(i+","+j+" : "+(allDots+k*k-dots+except));
                result = Math.max(result,allDots+k*k-dots+except);
            }
        }
        System.out.println(result);
    }

    private static int getDots(Set<Integer> used, DisjointUnionSets dsu, int index) {
        if(!used.contains(dsu.find(index))){
            used.add(dsu.find(index));
            return dsu.size[dsu.find(index)];
        }
        return 0;
    }

    static class DisjointUnionSets
    {
        int[] rank, parent,size;
        int n;

        // Constructor
        public DisjointUnionSets(int n)
        {
            size = new int[n];
            rank = new int[n];
            parent = new int[n];
            this.n = n;
            makeSet();
        }

        // Creates n sets with single item in each
        void makeSet()
        {
            for (int i=0; i<n; i++)
            {
                // Initially, all elements are in
                // their own set.
                parent[i] = i;
                size[i] = 1;
            }
        }

        // Returns representative of x's set
        int find(int x)
        {
            // Finds the representative of the set
            // that x is an element of
            if (parent[x]!=x)
            {
                // if x is not the parent of itself
                // Then x is not the representative of
                // his set,
                parent[x] = find(parent[x]);

                // so we recursively call Find on its parent
                // and move i's node directly under the
                // representative of this set
            }

            return parent[x];
        }

        // Unites the set that includes x and the set
        // that includes x
        void union(int x, int y)
        {
            // Find representatives of two sets
            int xRoot = find(x), yRoot = find(y);

            // Elements are in the same set, no need
            // to unite anything.
            if (xRoot == yRoot)
                return;

            // If x's rank is less than y's rank
            if (rank[xRoot] < rank[yRoot]) {

                // Then move x under y  so that depth
                // of tree remains less
                parent[xRoot] = yRoot;
                size[yRoot] += size[xRoot];
                // Else if y's rank is less than x's rank
            }else if (rank[yRoot] < rank[xRoot]) {

                // Then move y under x so that depth of
                // tree remains less
                parent[yRoot] = xRoot;
                size[xRoot] += size[yRoot];

            }else // if ranks are the same
            {
                // Then move y under x (doesn't matter
                // which one goes where)
                parent[yRoot] = xRoot;
                size[xRoot]+=size[yRoot];
                // And increment the the result tree's
                // rank by 1
                rank[xRoot] = rank[xRoot] + 1;
            }
        }
    }

    // -----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

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

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
    // --------------------------------------------------------


}