//Задача "План гостиницы"
//4-ая личная интернет-олимпиада сезона 2009-2010
//Автор задачи: Павел Маврин
//Автор решения: Ганеев Рустам, ganeev@rain.ifmo.ru
import java.io.*;
import java.util.*;
import java.math.*;

public class hotel_rg implements Runnable {

	public static void main(String[] args) {
		new Thread(new hotel_rg()).start();
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	boolean eof = false;
	Random rand = new Random(this.hashCode());

	public void run() {
		Locale.setDefault(Locale.US);
		try {
			br = new BufferedReader(new FileReader(FNAME + ".in"));
			out = new PrintWriter(FNAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	void myAssert(boolean u, String message) {
		if (!u) {
			throw new Error(message);
		}
	}

	int dx[] = { -1, 0, 1, 0 };
	int dy[] = { 0, -1, 0, 1 };
	String FNAME = "hotel";
	boolean used[][];
	int lx, ry, n, m, rx, ly;
	String a[];

	void dfs(int x, int y) {
		used[x][y] = true;
		lx = Math.min(x, lx);
		ly = Math.min(y, ly);
		rx = Math.max(x, rx);
		ry = Math.max(ry, y);
		for (int i = 0; i < 4; i++) {
			int tmpx = x + dx[i], tmpy = y + dy[i];
			if (tmpx >= 0 && tmpx < n && tmpy >= 0 && tmpy < m
					&& !used[tmpx][tmpy] && a[tmpx].charAt(tmpy) == '.') {
				dfs(tmpx, tmpy);
			}
		}
	}

	boolean check() {
		for (int i = lx; i <= rx; i++) {
			for (int j = ly; j <= ry; j++) {
				if (a[i].charAt(j) == '*')
					return false;
			}
		}
		return true;
	}

	private void solve() throws IOException {
		n = nextInt();
		m = nextInt();
		myAssert(n <= 30 && n >= 1 && m <= 30 && m >= 1, "Wrong n, m values");
		a = new String[n];
		for (int i = 0; i < n; i++) {
			a[i] = nextToken();
			myAssert(a[i].length() == m, "Wrong length of the line");
		}
		int max = -1;
		used = new boolean[n][m];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				if (!used[i][j] && a[i].charAt(j) == '.') {
					lx = rx = i;
					ly = ry = j;
					dfs(i, j);
					if (check()) {
						max = Math.max(max, (rx - lx + 1) * (ry - ly + 1));
					}
				}
			}
		}
		out.print(max);
	}
}
