def main():
    h,w = map(int, input().split())
    sl = []
    for _ in range(h):
        sl.append(list(input()))

    left_cnts = []
    for hi, row in enumerate(sl):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts.append(curr_left_cnts)


    right_cnts = []
    for hi, row in enumerate(sl):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts.append(curr_right_cnts)


    sl_t = [list(x) for x in zip(*sl)]
    left_cnts_t = []
    for hi, row in enumerate(sl_t):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts_t.append(curr_left_cnts)


    right_cnts_t = []
    for hi, row in enumerate(sl_t):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts_t.append(curr_right_cnts)


    ans = 0
    for hi in range(h):
        for wi in range(w):
            if sl[hi][wi] == '#':continue
            cnt = left_cnts[hi][wi] + right_cnts[hi][wi] + left_cnts_t[wi][hi] + right_cnts_t[wi][hi]
            ans = max(ans, cnt)

    print(ans+1)


if __name__ == "__main__":
    main() def main():
    h,w = map(int, input().split())
    sl = []
    for _ in range(h):
        sl.append(list(input()))

    left_cnts = []
    for hi, row in enumerate(sl):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts.append(curr_left_cnts)


    right_cnts = []
    for hi, row in enumerate(sl):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts.append(curr_right_cnts)


    sl_t = [list(x) for x in zip(*sl)]
    left_cnts_t = []
    for hi, row in enumerate(sl_t):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts_t.append(curr_left_cnts)


    right_cnts_t = []
    for hi, row in enumerate(sl_t):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts_t.append(curr_right_cnts)


    ans = 0
    for hi in range(h):
        for wi in range(w):
            if sl[hi][wi] == '#':continue
            cnt = left_cnts[hi][wi] + right_cnts[hi][wi] + left_cnts_t[wi][hi] + right_cnts_t[wi][hi]
            ans = max(ans, cnt)

    print(ans+1) main h,w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w sl = [] sl [] for _ in range(h):
        sl.append(list(input()))

     _ range(h) range h sl.append(list(input())) sl.append sl append list(input()) list input() input left_cnts = [] left_cnts [] for hi, row in enumerate(sl):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts.append(curr_left_cnts)


     hi row enumerate(sl) enumerate sl curr_left_cnts = [] curr_left_cnts [] curr_cnt = 0 curr_cnt 0 for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
         i s enumerate(row) enumerate row if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
         s == '.' s '.' curr_left_cnts.append(curr_cnt) curr_left_cnts.append curr_left_cnts append curr_cnt curr_cnt += 1 curr_cnt 1 curr_left_cnts.append(-1) curr_left_cnts.append curr_left_cnts append -1 curr_cnt = 0 curr_cnt 0 left_cnts.append(curr_left_cnts) left_cnts.append left_cnts append curr_left_cnts right_cnts = [] right_cnts [] for hi, row in enumerate(sl):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts.append(curr_right_cnts)


     hi row enumerate(sl) enumerate sl curr_right_cnts = [] curr_right_cnts [] curr_cnt = 0 curr_cnt 0 for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
         i s enumerate(row[::-1]) enumerate row[::-1] row ::-1 -1 if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
         s == '.' s '.' curr_right_cnts.append(curr_cnt) curr_right_cnts.append curr_right_cnts append curr_cnt curr_cnt += 1 curr_cnt 1 curr_right_cnts.append(-1) curr_right_cnts.append curr_right_cnts append -1 curr_cnt = 0 curr_cnt 0 curr_right_cnts = curr_right_cnts[::-1] curr_right_cnts curr_right_cnts[::-1] curr_right_cnts ::-1 -1 right_cnts.append(curr_right_cnts) right_cnts.append right_cnts append curr_right_cnts list(x) for x in zip(*sl) for x in zip(*sl) x zip(*sl) zip *sl sl for x in zip(*sl) list(x) list x sl_t = [list(x) for x in zip(*sl)] sl_t [list(x) for x in zip(*sl)] left_cnts_t = [] left_cnts_t [] for hi, row in enumerate(sl_t):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts_t.append(curr_left_cnts)


     hi row enumerate(sl_t) enumerate sl_t curr_left_cnts = [] curr_left_cnts [] curr_cnt = 0 curr_cnt 0 for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
         i s enumerate(row) enumerate row if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
         s == '.' s '.' curr_left_cnts.append(curr_cnt) curr_left_cnts.append curr_left_cnts append curr_cnt curr_cnt += 1 curr_cnt 1 curr_left_cnts.append(-1) curr_left_cnts.append curr_left_cnts append -1 curr_cnt = 0 curr_cnt 0 left_cnts_t.append(curr_left_cnts) left_cnts_t.append left_cnts_t append curr_left_cnts right_cnts_t = [] right_cnts_t [] for hi, row in enumerate(sl_t):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts_t.append(curr_right_cnts)


     hi row enumerate(sl_t) enumerate sl_t curr_right_cnts = [] curr_right_cnts [] curr_cnt = 0 curr_cnt 0 for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
         i s enumerate(row[::-1]) enumerate row[::-1] row ::-1 -1 if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
         s == '.' s '.' curr_right_cnts.append(curr_cnt) curr_right_cnts.append curr_right_cnts append curr_cnt curr_cnt += 1 curr_cnt 1 curr_right_cnts.append(-1) curr_right_cnts.append curr_right_cnts append -1 curr_cnt = 0 curr_cnt 0 curr_right_cnts = curr_right_cnts[::-1] curr_right_cnts curr_right_cnts[::-1] curr_right_cnts ::-1 -1 right_cnts_t.append(curr_right_cnts) right_cnts_t.append right_cnts_t append curr_right_cnts ans = 0 ans 0 for hi in range(h):
        for wi in range(w):
            if sl[hi][wi] == '#':continue
            cnt = left_cnts[hi][wi] + right_cnts[hi][wi] + left_cnts_t[wi][hi] + right_cnts_t[wi][hi]
            ans = max(ans, cnt)

     hi range(h) range h for wi in range(w):
            if sl[hi][wi] == '#':continue
            cnt = left_cnts[hi][wi] + right_cnts[hi][wi] + left_cnts_t[wi][hi] + right_cnts_t[wi][hi]
            ans = max(ans, cnt)

     wi range(w) range w if sl[hi][wi] == '#':continue
             sl[hi][wi] == '#' sl[hi][wi] [hi] sl hi wi '#' cnt = left_cnts[hi][wi] + right_cnts[hi][wi] + left_cnts_t[wi][hi] + right_cnts_t[wi][hi] cnt left_cnts[hi][wi] + right_cnts[hi][wi] + left_cnts_t[wi][hi] + right_cnts_t[wi][hi] left_cnts[hi][wi] + right_cnts[hi][wi] + left_cnts_t[wi][hi] left_cnts[hi][wi] + right_cnts[hi][wi] left_cnts[hi][wi] [hi] left_cnts hi wi right_cnts[hi][wi] [hi] right_cnts hi wi left_cnts_t[wi][hi] [wi] left_cnts_t wi hi right_cnts_t[wi][hi] [wi] right_cnts_t wi hi ans = max(ans, cnt) ans max(ans, cnt) max ans cnt print(ans+1) print ans+1 ans 1 if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    h,w = map(int, input().split())
    sl = []
    for _ in range(h):
        sl.append(list(input()))

    left_cnts = []
    for hi, row in enumerate(sl):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts.append(curr_left_cnts)


    right_cnts = []
    for hi, row in enumerate(sl):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts.append(curr_right_cnts)


    sl_t = [list(x) for x in zip(*sl)]
    left_cnts_t = []
    for hi, row in enumerate(sl_t):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts_t.append(curr_left_cnts)


    right_cnts_t = []
    for hi, row in enumerate(sl_t):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts_t.append(curr_right_cnts)


    ans = 0
    for hi in range(h):
        for wi in range(w):
            if sl[hi][wi] == '#':continue
            cnt = left_cnts[hi][wi] + right_cnts[hi][wi] + left_cnts_t[wi][hi] + right_cnts_t[wi][hi]
            ans = max(ans, cnt)

    print(ans+1) def main():
    h,w = map(int, input().split())
    sl = []
    for _ in range(h):
        sl.append(list(input()))

    left_cnts = []
    for hi, row in enumerate(sl):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts.append(curr_left_cnts)


    right_cnts = []
    for hi, row in enumerate(sl):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts.append(curr_right_cnts)


    sl_t = [list(x) for x in zip(*sl)]
    left_cnts_t = []
    for hi, row in enumerate(sl_t):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts_t.append(curr_left_cnts)


    right_cnts_t = []
    for hi, row in enumerate(sl_t):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts_t.append(curr_right_cnts)


    ans = 0
    for hi in range(h):
        for wi in range(w):
            if sl[hi][wi] == '#':continue
            cnt = left_cnts[hi][wi] + right_cnts[hi][wi] + left_cnts_t[wi][hi] + right_cnts_t[wi][hi]
            ans = max(ans, cnt)

    print(ans+1) main
def main():
    h,w = map(int, input().split())
    sl = []
    for _ in range(h):
        sl.append(list(input()))

    left_cnts = []
    for hi, row in enumerate(sl):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts.append(curr_left_cnts)


    right_cnts = []
    for hi, row in enumerate(sl):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts.append(curr_right_cnts)


    sl_t = [list(x) for x in zip(*sl)]
    left_cnts_t = []
    for hi, row in enumerate(sl_t):
        curr_left_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row):
            if s == '.':
                curr_left_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_left_cnts.append(-1)
                curr_cnt = 0
        left_cnts_t.append(curr_left_cnts)


    right_cnts_t = []
    for hi, row in enumerate(sl_t):
        curr_right_cnts = []
        curr_cnt = 0
        for i, s in enumerate(row[::-1]):
            if s == '.':
                curr_right_cnts.append(curr_cnt)
                curr_cnt += 1
            else:
                curr_right_cnts.append(-1)
                curr_cnt = 0
        curr_right_cnts = curr_right_cnts[::-1]
        right_cnts_t.append(curr_right_cnts)


    ans = 0
    for hi in range(h):
        for wi in range(w):
            if sl[hi][wi] == '#':continue
            cnt = left_cnts[hi][wi] + right_cnts[hi][wi] + left_cnts_t[wi][hi] + right_cnts_t[wi][hi]
            ans = max(ans, cnt)

    print(ans+1)


if __name__ == "__main__":
    main()