import java.io.*;
import java.util.*;

public class nose_va_wa {
	public static void main(String[] args) {
		new nose_va_wa().run();
	}

	BufferedReader br;
	StringTokenizer in;
	PrintWriter out;

	public String nextToken() throws IOException {
		while (in == null || !in.hasMoreTokens()) {
			in = new StringTokenizer(br.readLine());
		}
		return in.nextToken();
	}

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

	int[] dx = { 0, 1 };
	int[] dy = { 1, 0 };

	public void solve() throws IOException {
		int n = nextInt();
		int m = nextInt();

		char[][] c = new char[n][m];

		for (int i = 0; i < c.length; i++) {
			c[i] = nextToken().toCharArray();
		}

		int ans = 0;
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				if (c[i][j] == '#')
					continue;

				ans += 2;
			}
		}

		out.println(ans);
	}

	public void run() {
		try {
			br = new BufferedReader(new FileReader("nose.in"));
			out = new PrintWriter("nose.out");

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
