Problem: There is a grid with H horizontal rows and W vertical columns, and there are obstacles on some of the squares.

Snuke is going to choose one of the squares not occupied by an obstacle and place a lamp on it. The lamp placed on the square will emit straight beams of light in four cardinal directions: up, down, left, and right. In each direction, the beam will continue traveling until it hits a square occupied by an obstacle or it hits the border of the grid. It will light all the squares on the way, including the square on which the lamp is placed, but not the square occupied by an obstacle.

Snuke wants to maximize the number of squares lighted by the lamp.

You are given H strings S_i (1 \leq i \leq H), each of length W. If the j-th character (1 \leq j \leq W) of S_i is `#`, there is an obstacle on the square at the i-th row from the top and the j-th column from the left; if that character is `.`, there is no obstacle on that square.

Find the maximum possible number of squares lighted by the lamp.

Constraints

* 1 \leq H \leq 2,000
* 1 \leq W \leq 2,000
* S_i is a string of length W consisting of `#` and `.`.
* `.` occurs at least once in one of the strings S_i (1 \leq i \leq H).

Input

Input is given from Standard Input in the following format:


H W
S_1
:
S_H


Output

Print the maximum possible number of squares lighted by the lamp.

Examples

Input

4 6
#..#..
.....#
....#.
#.#...


Output

8


Input

4 6
..#..
.....#
....#.
.#...


Output

8


Input

8 8
..#...#.
....#...
......
..###..#
...#..#.
....#.
...#...
.#..#


Output

13

Solution (in JAVA):

Solution:
import java.util.*;

public class Main {
	public static void printArray(int[] a) {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + ", ");
		}
		System.out.println();
	}

	// public static<T> void printArrayT(T[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	// public static class Triple implements Comparable<Triple> {
	// 	public int A, B, C;
	// 	Triple(int A, int B, int C) {
	// 		this.A = A;
	// 		this.B = B;
	// 		this.C = C;
	// 	}

	// 	@Override
	// 	public String toString() {
	// 		return String.format("(%d, %d, %d)", A, B, C);
	// 	}

	// 	@Override
	// 	public int compareTo(Triple o) {
	// 		int a = this.A - o.A;
	// 		if (a != 0) return a;
	// 		int b = this.B - o.B;
	// 		if (b != 0) return b;
	// 		return this.C - o.C;
	// 	}
	// }

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int H = sc.nextInt();
		int W = sc.nextInt();
		char[][] map = new char[H][];
		for (int i = 0; i < H; i++) {
			String s = sc.next();
			map[i] = s.toCharArray();
		}
		int[][] LEFT = new int[H][W];
		for (int y = 0; y < H; y++) {
			if (map[y][0] == '.') LEFT[y][0] = 1;
			for (int x = 1; x < W; x++) {
				if (map[y][x] == '.') LEFT[y][x] = LEFT[y][x - 1] + 1;
			}
		}
		int[][] RIGHT = new int[H][W];
		for (int y = 0; y < H; y++) {
			if (map[y][W-1] == '.') RIGHT[y][W-1] = 1;
			for (int x = W-2; x >= 0; x--) {
				if (map[y][x] == '.') RIGHT[y][x] = RIGHT[y][x + 1] + 1;
			}
		}
		int[][] TOP = new int[H][W];
		for (int x = 0; x < W; x++) {
			if (map[0][x] == '.') TOP[0][x] = 1;
			for (int y = 1; y < H; y++) {
				if (map[y][x] == '.') TOP[y][x] = TOP[y - 1][x] + 1;
			}
		}
		int[][] BOTTOM = new int[H][W];
		for (int x = 0; x < W; x++) {
			if (map[H-1][x] == '.') BOTTOM[H-1][x] = 1;
			for (int y = H-2; y >= 0; y--) {
				if (map[y][x] == '.') BOTTOM[y][x] = BOTTOM[y + 1][x] + 1;
			}
		}


		int max = 0;
		for (int y = 0; y < H; y++) {
			for (int x = 0; x < W; x++) {
				if (map[y][x] != '.') continue;
				// int cnt = 1;
				// for (int x2 = x - 1; x2 >= 0; x2--) {
				// 	if (map[y][x2] != '.') break;
				// 	cnt++;
				// }
				// for (int x2 = x + 1; x2 < W; x2++) {
				// 	if (map[y][x2] != '.') break;
				// 	cnt++;
				// }
				// for (int y2 = y - 1; y2 >= 0; y2--) {
				// 	if (map[y2][x] != '.') break;
				// 	cnt++;
				// }
				// for (int y2 = y + 1; y2 < H; y2++) {
				// 	if (map[y2][x] != '.') break;
				// 	cnt++;
				// }
				int sum = LEFT[y][x] + RIGHT[y][x] + TOP[y][x] + BOTTOM[y][x] - 3;
				// assert cnt == sum : "assert";

				max = Math.max(max, sum);
			}
		}
		System.out.println(max);
	}
}