#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <algorithm>

using ll = long long;


void print(){ std::cout << std::endl; }
template <typename Head> void print(Head&& head) { std::cout << head << std::endl; }
template <typename Head, typename... Tail> void print(Head&& head, Tail&&... tail)
{
  std::cout << head << " ";
  print(std::forward<Tail>(tail)...); // or print(tail...);
}


const ll INF = (ll)1e18;
const ll MOD = 1e9 + 7;

ll H, W, V;
ll sy, sx, gy, gx;
ll dy[4] = { 0,  0, -1, +1};
ll dx[4] = {-1, +1,  0,  0};

ll pos2idx(ll y, ll x) { return y * W + x; }
ll idx2y(ll idx) { return idx / W; }
ll idx2x(ll idx) { return idx % W; }

typedef struct {
  ll from;
  ll to;
  ll cost;
} S_Edge;

void research_grid(std::vector< std::string >& grid, std::vector< std::vector< S_Edge > >& vedge)
{
  for (ll y = 0; y < H; y++) {
    for (ll x = 0; x < W; x++) {
      for (ll d = 0; d < 4; d++) {
	ll ny = y + dy[d];
	ll nx = x + dx[d];
	ll from = pos2idx( y,  x);
	ll to   = pos2idx(ny, nx);
	if (ny >= 0 && nx >= 0 && ny < H && nx < W) {
	  S_Edge edge;
	  edge.from = from;
	  edge.to   = to;
	  edge.cost = grid[ny][nx] == '#' ? INF : 1;
	  vedge[from].push_back(edge);
	}
      }
    }
  }
}

void research_grid2(std::vector< std::string >& grid, std::vector< std::vector< ll > >& warshall_dist)
{
  for (ll y = 0; y < H; y++) {
    for (ll x = 0; x < W; x++) {
      ll from = pos2idx( y,  x);
      warshall_dist[from][from] = 0LL;
      for (ll d = 0; d < 4; d++) {
	ll ny = y + dy[d];
	ll nx = x + dx[d];
	ll to   = pos2idx(ny, nx);
	if (ny >= 0 && nx >= 0 && ny < H && nx < W) {
	  warshall_dist[from][to] = grid[ny][nx] == '#' ? INF : 1;
	}
      }
    }
  }
}

void research_grid3(std::vector< std::string >& grid, std::vector< S_Edge >& vedge)
{
  for (ll y = 0; y < H; y++) {
    for (ll x = 0; x < W; x++) {
      for (ll d = 0; d < 4; d++) {
	ll ny = y + dy[d];
	ll nx = x + dx[d];
	ll from = pos2idx( y,  x);
	ll to   = pos2idx(ny, nx);
	if (ny >= 0 && nx >= 0 && ny < H && nx < W) {
	  S_Edge edge;
	  edge.from = from;
	  edge.to   = to;
	  edge.cost = grid[ny][nx] == '#' ? INF : 1;
	  vedge.push_back(edge);
	}
      }
    }
  }
}


ll get_distance_dijkstra(std::string& idx_grid, std::vector< std::vector< S_Edge > >& vedge)
{
  std::vector<ll> dist(V, INF);
  ll s = pos2idx(sy, sx);
  ll g = pos2idx(gy, gx);

  dist[s] = 0LL;
  typedef std::pair<ll, ll> P;
  std::priority_queue<P, std::vector<P>, std::greater<P> > que;
  que.push(P(dist[s], s));
  while (!que.empty()) {
    P p = que.top(); que.pop();
    ll v = p.second;
    for (auto edge : vedge[v]) {
      if (dist[edge.to] > dist[edge.from] + edge.cost) {
	dist[edge.to] = dist[edge.from] + edge.cost;
	que.push(P(dist[edge.to], edge.to));
      }
    }
  }

  return dist[g];
}

ll get_distance_warshallFloyd(std::string& idx_grid, std::vector< std::vector< ll > >& dist)
{
  ll s = pos2idx(sy, sx);
  ll g = pos2idx(gy, gx);

  for (ll k = 0; k < V; k++)
    for (ll i = 0; i < V; i++)
      for (ll j = 0; j < V; j++)
	dist[i][j] = std::min(dist[i][j], dist[i][k] + dist[k][j]);

  return dist[s][g];
}

ll get_distance_bellmanFord(std::string& idx_grid, std::vector< S_Edge >& vedge)
{
  std::vector<ll> dist(V, INF);
  ll s = pos2idx(sy, sx);
  ll g = pos2idx(gy, gx);

  dist[s] = 0LL;
  while(1) {
    bool was_updated = false;

    for (auto it = vedge.begin(); it != vedge.end(); it++) {
      if (dist[it->to] > dist[it->from] + it->cost) {
	dist[it->to] = dist[it->from] + it->cost;
	was_updated = true;
      }
    }
    if (!was_updated) {
      break;
    }
  }

  return dist[g];
}

ll get_distance_bfs(std::string& idx_grid, std::vector< std::vector< S_Edge > >& vedge)
{
  std::vector<ll> dist(V, INF);
  std::queue<ll> que;
  ll s = pos2idx(sy, sx);
  ll g = pos2idx(gy, gx);

  dist[s] = 0LL;
  que.push(s);
  while (!que.empty()) {
    ll v = que.front(); que.pop();
    for (auto edge : vedge[v]) {
      if (dist[edge.to] > dist[edge.from] + edge.cost) {
	dist[edge.to] = dist[edge.from] + edge.cost;
	que.push(edge.to);
      }
    }
  }
  return dist[g];
}

int main()
{
  std::cin >> H >> W;
  V = H * W;
  std::vector< std::string > grid(H, std::string(W, 'x'));
  std::string idx_grid;

  for (ll y = 0; y < H; y++) {
    std::cin >> grid[y];
    idx_grid += grid[y];
  }

  std::vector< std::vector<ll> > sumx(H, std::vector<ll>(W, 0LL));
  for (ll y = 0; y < H; y++) {
    sumx[y][0] = grid[y][0] == '#' ? 0 : 1;
    for (ll x = 1; x < W; x++) {
      if (grid[y][x] == '#') {
	sumx[y][x] = 0LL;
      } else {
	sumx[y][x] = grid[y][x-1] == '.' ? sumx[y][x-1] + 1 : 1;
      }
    }
    for (ll x = W-2; x >= 0; x--) {
      if (grid[y][x+1] == '.' && grid[y][x] == '.') {
	sumx[y][x] = sumx[y][x+1];
      }
    }
  }

  std::vector< std::vector<ll> > sumy(H, std::vector<ll>(W, 0LL));
  for (ll x = 0; x < W; x++) {
    sumy[0][x] = grid[0][x] == '#' ? 0 : 1;
    for (ll y = 1; y < H; y++) {
      if (grid[y][x] == '#') {
	sumy[y][x] = 0LL;
      } else {
	sumy[y][x] = grid[y-1][x] == '.' ? sumy[y-1][x] + 1 : 1;
      }
    }
    for (ll y = H-2; y >= 0; y--) {
      if (grid[y+1][x] == '.' && grid[y][x] == '.') {
	sumy[y][x] = sumy[y+1][x];
      }
    }
  }

  ll ans = 0LL;
  for (ll y = 0; y < H; y++) {
    for (ll x = 0; x < W; x++) {
      ll sum = sumx[y][x] + sumy[y][x] - 1;
      ans = std::max(ans, sum);
    }
  }

  print(ans);
  return 0;
}


Measured memory_bytes: 72960