using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Collections;
static class Extensions
{
    public static int ToInt(this string s) => int.Parse(s);
    public static long ToLong(this string s) => long.Parse(s);
    public static char ToChar(this string s) => char.Parse(s);
    public static double ToDouble(this string s) => double.Parse(s);
    public static int[] ToIntArray(this string s) => s.Replace(',', ' ').Split(' ').Select(x => x.ToInt()).ToArray();
    public static long[] ToLongArray(this string s) => s.Replace(',', ' ').Split(' ').Select(x => x.ToLong()).ToArray();
    public static double[] ToDoubleArray(this string s) => s.Replace(',', ' ').Split(' ').Select(x => x.ToDouble()).ToArray();
}

class Program
{
    static string[] ReadLines(int n) => Enumerable.Range(0, n).Select(s => Console.ReadLine()).ToArray();

    static void Main()
    {
        var hw = Console.ReadLine().ToIntArray();
        int H = hw[0];
        int W = hw[1];

        char[,] map = new char[H, W];

        for(int i = 0; i < H; i++)
        {
            var s = Console.ReadLine();
            for(int j = 0; j < W; j++)
            {
                map[i, j] = s[j];
            }
        }

        //それより上にある障害物までの距離
        int[,] upper = new int[H, W];
        int[,] lower = new int[H, W];
        int[,] lefter = new int[H, W];
        int[,] righter = new int[H, W];

        for (int i = 0; i < H; i++)
        {
            //左を照らせる範囲
            int n = 0;
            for (int j = 0; j < W; j++)
            {
                lefter[i, j] = n;
                if(map[i,j] == '.')
                {
                    n++;
                }
                else
                {
                    n = 0;
                }
            }
        }

        for (int i = 0; i < H; i++)
        {
            //右を照らせる範囲
            int n = 0;
            for (int j = W - 1; j >= 0; j--)
            {
                righter[i, j] = n;
                if (map[i, j] == '.')
                {
                    n++;
                }
                else
                {
                    n = 0;
                }
            }
        }

        for (int i = 0; i < W; i++)
        {
            //上を照らせる範囲
            int n = 0;
            for (int j = 0; j < H; j++)
            {
                upper[j, i] = n;
                if (map[j, i] == '.')
                {
                    n++;
                }
                else
                {
                    n = 0;
                }
            }
        }

        for (int i = 0; i < W; i++)
        {
            //下を照らせる範囲
            int n = 0;
            for (int j = H - 1; j >= 0; j--)
            {
                lower[j, i] = n;
                if (map[j, i] == '.')
                {
                    n++;
                }
                else
                {
                    n = 0;
                }
            }
        }

        int ans = 0;

        for (int i = 0; i < H; i++)
        {            
            for (int j = 0; j < W; j++)
            {
                if (map[i, j] == '#') continue;

                int val = upper[i, j] + lower[i, j] + lefter[i, j] + righter[i, j] + 1;

                ans = Math.Max(ans, val);
            }
        }

        Console.WriteLine(ans);
    }
}

Measured memory_bytes: 85448