unittest
{
	assert( [ "4 6", "#..#..", ".....#", "....#.", "#.#..." ].parse.expand.solve == 8 );
	assert( [ "8 8", "..#...#.", "....#...", "##......", "..###..#", "...#..#.", "##....#.", "#...#...", "###.#..#" ].parse.expand.solve == 13 );
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto hw = input.front.split.to!( long[] );
	auto ss = new char[][]( hw[ 0 ], hw[ 1 ] );
	foreach( ref s; ss )
	{
		input.popFront;
		s = input.front.to!( char[] );
	}
	return tuple( ss );
}

auto solve( char[][] ss )
{
	// 横に照らせるマス目をカウント
	auto wss = new long[][]( ss.length, ss[ 0 ].length );
	for( auto y = 0L; y < ss.length; y++ )
	{
		auto c = 0L;
		for( auto x = 0L; x < ss[ 0 ].length; x++ )
		{
			if( ss[ y ][ x ] == '#' )
			{
				wss[ y ][ x - c .. x ] = c;
				c = 0;
			}
			else
			{
				c++;
			}
		}
		wss[ y ][ $ - c .. $ ] = c;
	}
	
	// 縦に照らせるマス目をカウント
	auto hss = new long[][]( ss.length, ss[ 0 ].length );
	for( auto x = 0L; x < ss[ 0 ].length; x++ )
	{
		auto c = 0L;
		for( auto y = 0L; y < ss.length; y++ )
		{
			if( ss[ y ][ x ] == '#' )
			{
				for( auto i = y - c; i < y; i++ ) hss[ i ][ x ] = c;
				c = 0;
			}
			else
			{
				c++;
			}
		}
		for( auto i = wss.length - c; i < wss.length; i++ ) hss[ i ][ x ] = c;
	}
	
	// 縦横を足したときの最大値を判定
	auto ans = 0L;
	for( auto x = 0L; x < ss[ 0 ].length; x++ )
	{
		for( auto y = 0L; y < ss.length; y++ )
		{
			ans = max( ans, wss[ y ][ x ] + hss[ y ][ x ] - 1 );
		}
	}
	return ans;
}
