#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int h, w;
  cin >> h >> w;
  string arr[w];
  for (int i = 0; i < w; i++) {
    cin >> arr[i];
    arr[i] += '#';
  }
  int dp[h][w + 1];
  memset(dp, 0, sizeof(dp));
  int ans = 0;
  for (int j = w - 1; j >= 0; j--) {
    for (int i = 0; i < h; i++) {
      if (arr[i][j] == '#') {
        continue;
      }
      if (arr[i][j + 1] == '.') {
        dp[i][j] = dp[i][j + 1] + 1;
      } else {
        int cnt = j == w - 1 ? 0 : 1;
        for (int k = i - 1; k >= 0 && arr[k][j] != '#'; k--) {
          cnt++;
          dp[i][j] = dp[k][j + 1] + cnt;
        }
        cnt = j == w - 1 ? 0 : 1;
        for (int k = i + 1; k < h && arr[k][j] != '#'; k++) {
          cnt++;
          dp[i][j] = dp[k][j + 1] + cnt;
        }
      }
    }
  }
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      ans = max(ans, dp[i][j]);
    }
  }
  cout << ans << endl;
  return 0;
}
