using System;
using System.Collections.Generic;
using System.Linq;
class Program{

    const long MOD =1000000007;
   
    static void Main(string[] args){
        int[] num = ScanIntArray(2);
        int h = num[0];
        int w = num[1];
        int[,] lit = new int[h, w];
        int ans = 0;
        // 横と縦を独立に考えればよい。
        char[,] ch = new char[h, w];
        
        for (int i = 0; i < h; i++)
        {
            string tp = Console.ReadLine();
            char[] tpch = tp.ToCharArray();
            for (int j = 0; j < w; j++)
            {
                ch[i, j] = tpch[j];
            }
        }
        
        // yoko
        for (int i = 0; i < h; i++)
        {
            int iter = -1;
            int plus = 0;
            for (int j = 0; j < w; j++)
            {
                if (ch[i, j] == '.' )
                {
                    // lit
                    plus++;
                }
                else // #
                {
                    if(iter == j - 1) { }
                    else
                    {
                        for (int k = iter+1; k < j; k++)
                        {
                            lit[i, k] += plus;
                        }
                    }
                    plus = 0;
                    iter = j;
                }
            }
            for (int k = iter+1; k < w; k++)
            {
                lit[i, k] += plus;
            }
        }
        

        // tate
        for (int i = 0; i < w; i++)
            // i -> w, // j -> h
        {
            int iter = -1;
            int plus = 0;
            for (int j = 0; j < h; j++)
            {
                if (ch[j, i] == '.')
                {
                    // lit
                    plus++;
                }
                else // # or end
                {
                    if (iter == i - 1) { }
                    else
                    {
                        for (int k = iter + 1; k < j; k++)
                        {
                            lit[k,i] += plus;
                        }
                    }
                    plus = 0;
                    iter = j;
                }
            }
            for (int k = iter + 1; k < h; k++)
            {
                lit[k, i] += plus;
            }

        }


        for (int i = 0; i < h; i++)
        {
            for (int j = 0; j < w; j++)
            {
                ans = Math.Max(ans, lit[i, j] - 1);
            }
        }
        Console.WriteLine(ans);


    }

   
    static int Nibutan(long[] array, long k)
        // 以上・未満などをちゃんと見ること！
    {
        int low = 0 ;
        int high = array.Length-1;
        int mid = high;

        while (low < high)
        {
            mid = (low + high) / 2;
            if(array[mid] >= k) // k以上の最小index.ココを変えるだけ
            {
                high = mid;
            }
            else
            {
                low = mid + 1;
            }
            mid = (low + high) / 2;
        }
        return mid;
    }

    static int ScanOneInt()
    {
        return int.Parse(Console.ReadLine());
    }

    static long ScanOneLong()
    {
        return long.Parse(Console.ReadLine());
    }

    static int[] ScanIntArray(int t)
    {
        string[] str = Console.ReadLine().Split(' ');
        int[] ar = new int[t];
        for (int i = 0; i < t; i++)
        {
            ar[i] = int.Parse(str[i]);
        }
        return ar;
    }

    static Tuple<int,int> ScanTuple()
    {
        int[] tmp = ScanIntArray(2);
        return new Tuple<int, int>(tmp[0], tmp[1]);
    }
    static long[] ScanLongArray(int t)
    {
        string[] str = Console.ReadLine().Split(' ');
        long[] ar = new long[t];
        for (int i = 0; i < t; i++)
        {
            ar[i] = long.Parse(str[i]);
        }
        return ar;
    }

    static string[] ScanStringArray()
    {
        return Console.ReadLine().Split(' ');
    }

    static double[] ScanDoubleArray(int t)
    {
        string[] str = Console.ReadLine().Split(' ');
        double[] ar = new double[t];
        for (int i = 0; i < t; i++)
        {
            ar[i] = double.Parse(str[i]);
        }
        return ar;
    }


    static int[,] CombModMake()
    {
        int[,] res = new int[2005, 2005];
        for (int i = 0; i < 2005; i++)
        {
            for (int j = 0; j < 2005; j++)
            {
                if (i == 0 || i < j)
                {
                    res[i, j] = 0;
                }
                else if (j == 0 || i == j)
                {
                    res[i, j] = 1;
                }
                else
                {
                    res[i, j] = (res[i - 1, j] + res[i - 1, j - 1]) % (int)MOD;
                }
            }
        }
        return res;
    }

    static int Gcd (int a, int b)
    {
        if(b == 0)
        {
            return a;
        }
        else
        {
            return Gcd(b, a % b);
        }
    }

    static long Gcd_l(long a, long b)
    {
        if (b == 0)
        {
            return a;
        }
        else
        {
            return Gcd_l(b, a % b);
        }
    }


}

/*
 * pairのソート
        List<Tuple<int, int>> pairList = new List<Tuple<int, int>>();
        for (int i = 0; i < n; i++)
        {
            Tuple<int, int> tmp = ScanTuple();
            pairList.Add(tmp);
        }
        IOrderedEnumerable<Tuple<int, int>> sortedList = pairList.OrderBy(a => a.Item1).ThenBy(a => a.Item2);
*/


Measured memory_bytes: 38468