using System;
using System.Collections.Generic;
using static AtCoderer.Exter;
using static System.Math;
using System.Linq;

namespace AtCoderer
{

    public class App
    {
        public static void Solve()
        {
            int h, w;
            {
                int[] r1 = readarr;
                h = r1[0];
                w = r1[1];
            }
            int[][] mat = new int[h][];
            int[][] mat2 = new int[h][];
            bool[][] r = new bool[h][];
            for (int i = 0; i < h; i++)
                r[i] = Console.ReadLine().Select(c=>c=='.').ToArray();
            for (int i = 0; i < h; i++)
            {
                mat[i] = new int[w];
                mat2[i] = new int[w];
                List<bi> l = new List<bi>();
                bool prev = r[i][0];
                int cont = 0;
                for (int si = 0; si < w; si++)
                {
                    if (prev == r[i][si])
                        cont++;
                    else
                    {
                        l.Add(new bi(prev, cont));
                        cont = 1;
                        prev = r[i][si];
                    }
                }
                l.Add(new bi(prev, cont));
                int cind = 0;
                foreach(var m in l)
                {
                    int bind = cind;
                    if(m.b)
                    {
                        for (; cind < bind + m.i; cind++)
                            mat[i][cind] = m.i;
                    }
                    else
                    {
                        for (; cind < bind + m.i; cind++)
                            mat[i][cind] = -10000;
                    }
                }
            }
            for (int i = 0; i < w; i++)
            {
                List<bi> l = new List<bi>();
                bool prev = r[0][i];
                int cont = 0;
                for (int si = 0; si < h; si++)
                {
                    if (prev == r[si][i])
                        cont++;
                    else
                    {
                        l.Add(new bi(prev, cont));
                        cont = 1;
                        prev = r[si][i];
                    }
                }
                l.Add(new bi(prev, cont));
                int cind = 0;
                foreach (var m in l)
                {
                    int bind = cind;
                    if (m.b)
                    {
                        for (; cind < bind + m.i; cind++)
                            mat2[cind][i] = m.i;
                    }
                    else
                    {
                        for (; cind < bind + m.i; cind++)
                            mat2[cind][i] = -10000;
                    }
                }
            }
            int Max = -1;
            for (int i = 0; i < h; i++)
            {
                for (int j = 0; j < w; j++)
                {
                    if (Max < mat[i][j] + mat2[i][j] - 1)
                        Max = mat[i][j] + mat2[i][j] - 1;
                }
            }
            Console.WriteLine(Max);

        }
        public static void Main(string[] args)
        {
            Solve();
            Console.ReadKey();
        }
        public class bi
        {
            public bi(bool B,int I)
            {
                b = B;
                i = I;
            }
            public bool b;
            public int i;
            public override string ToString()
            {
                return "(" + b + "," + i + ")";
            }
        }
    }
    public static class Exter
    {
        public static void rep(int loop, Action<int> act)
        {
            for (int i = 0; i < loop; i++)
                act(i);
        }
        public static int Max(params int[] p) => p.Max();
        public static long Max(params long[] p) => p.Max();
        public static int Min(params int[] p) => p.Min();
        public static long Min(params long[] p) => p.Min();
        public static int Gcd(int a, int b) => a > b ? GcdRecursive(a, b) : GcdRecursive(b, a);
        private static int GcdRecursive(int a, int b) => b == 0 ? a : GcdRecursive(b, a % b);
        public static void EnumArr<t>(this IEnumerable<t> v)
        {
            Console.WriteLine(string.Join(",", v));
        }
        public static string ToString(this IEnumerable<char> v)
        {
            return string.Join(",", v);
        }
        public static int[] readarr
        {
            get
            {
                return Console.ReadLine().Split().Select(s => int.Parse(s)).ToArray();
            }
        }
        public class UnionFind
        {
            private int[] Parent;
            private int GetRoot(int v)
            {
                if (Parent[v] < 0)
                    return v;
                else
                    return Parent[v] = GetRoot(Parent[v]);
            }
            public UnionFind(int size)
            {
                Parent = new int[size];
                for (int i = 0; i < size; i++)
                    Parent[i] = -1;
            }
            public bool AreGrouped(int a, int b)
            {
                return GetRoot(a) == GetRoot(b);
            }
            public void Connect(int a, int b)
            {
                a = GetRoot(a);
                b = GetRoot(b);
                if (a == b) return;
                if (Parent[b] < Parent[a])
                {
                    Parent[b] += Parent[a];
                    Parent[a] = b;
                }
                else
                {
                    Parent[a] += Parent[b];
                    Parent[b] = a;
                }
            }
            public int GetGroupSize(int a)
            {
                return -Parent[GetRoot(a)];
            }
        }
    }
}

Measured memory_bytes: 77600