#include <bits/stdc++.h>

typedef uintmax_t    ull;
typedef intmax_t     ll;
typedef uint64_t     ul;
typedef uint32_t     ui;
typedef uint8_t      uc;

using namespace std;

vector<string> dimention{};
vector<vector<ll>> num_of_row_axis_pos_direction{};
vector<vector<ll>> num_of_row_axis_neg_direction{};
vector<vector<ll>> num_of_column_axis_pos_direction{};
vector<vector<ll>> num_of_column_axis_neg_direction{};

const ll recursion_column_axis_pos_direction(const ui row, const ui column)
{
	if (num_of_column_axis_pos_direction[row][column] == -1)
	{
		ll possible = dimention[row][column] == '.' ? 1 : 0;

		if (!possible
			|| (column + 1) == dimention[row].size())
		{
			num_of_column_axis_pos_direction[row][column] = possible;
		}
		else
		{
			num_of_column_axis_pos_direction[row][column] = recursion_column_axis_pos_direction(row, column + 1) + possible;
		}
	}

	return num_of_column_axis_pos_direction[row][column];
}

const ll recursion_column_axis_neg_direction(const ui row, const ui column)
{
	if (num_of_column_axis_neg_direction[row][column] == -1)
	{
		ll possible = dimention[row][column] == '.' ? 1 : 0;
		if (!possible
			|| column == 0)
		{
			num_of_column_axis_neg_direction[row][column] = possible;
		}
		else
		{
			num_of_column_axis_neg_direction[row][column] = recursion_column_axis_neg_direction(row, column - 1) + possible;
		}
	}

	return num_of_column_axis_neg_direction[row][column];
}

const ll recursion_row_axis_pos_direction(const ui row, const ui column)
{
	if (num_of_row_axis_pos_direction[column][row] == -1)
	{
		ll possible = dimention[row][column] == '.' ? 1 : 0;
		if (!possible
			|| (row + 1) == dimention.size())
		{
			num_of_row_axis_pos_direction[column][row] = possible;
		}
		else
		{
			num_of_row_axis_pos_direction[column][row] = recursion_row_axis_pos_direction(row + 1, column) + possible;
		}
	}

	return num_of_row_axis_pos_direction[column][row];
}

const ll recursion_row_axis_neg_direction(const ui row, const ui column)
{
	if (num_of_row_axis_neg_direction[column][row] == -1)
	{
		ll possible = dimention[row][column] == '.' ? 1 : 0;
		if (!possible
			|| row == 0)
		{
			num_of_row_axis_neg_direction[column][row] = possible;
		}
		else
		{
			num_of_row_axis_neg_direction[column][row] = recursion_row_axis_neg_direction(row - 1, column) + possible;
		}
	}

	return num_of_row_axis_neg_direction[column][row];
}

ll solve(void)
{
	ui H{}, W{};
	cin >> H >> W;

	num_of_row_axis_pos_direction.resize(W, vector<ll>(H, -1));
	num_of_row_axis_neg_direction.resize(W, vector<ll>(H, -1));
	num_of_column_axis_pos_direction.resize(H, vector<ll>(W, -1));
	num_of_column_axis_neg_direction.resize(H, vector<ll>(W, -1));

	dimention.resize(H);

	for (ui i = 0; i < H; ++i)
	{
		cin >> dimention[i];
	}

	ll ans{ -1 };
	for (ui row = 0; row < H; ++row)
	{
		for (ui column = 0; column < W; ++column)
		{
			auto res = recursion_column_axis_pos_direction(row, column)
				+ recursion_column_axis_neg_direction(row, column)
				+ recursion_row_axis_pos_direction(row, column)
				+ recursion_row_axis_neg_direction(row, column)
				- 3;
			
			ans = max(ans, res);
		}
	}
	return ans;
}

int main(void)
{
	std::ios_base::sync_with_stdio(false);
	std::cin.tie(0);

	auto ans = solve();
	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 130048