#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <list>
#include <set>
#include <map>
#include <vector>
#include <math.h>
#include <fstream>
#include <sstream>
#include <unordered_map>
#include <ctime>
#include <assert.h>
using namespace std;

//#define ATCODER

#ifdef ATCODER
#include <atcoder/all>
#endif

const unsigned long long MOD = (unsigned long long)(1e9 + 7);

#define FROM_0(i, n) for(int i = 0; i < (n); i++)
#define FROM_S(i, s, e) for(int i = (s); i < (e); i++)
#define ITER_BEGIN_END(iter, vec) for(auto iter = vec.begin(); iter != vec.end(); iter++)

string s[200];

int main()
{
    int h, w;
    cin >> h >> w;
    FROM_0(i, h)
        cin >> s[i];
    int count = 0;
    FROM_0(i, h)
    {
        FROM_0(j, w)
        {
            if (s[i][j] == '#')
                continue;
            if (i < h - 1 && s[i + 1][j] == '.')
                count++;
            if (j < w - 1 && s[i][j + 1] == '.')
                count++;
        }
    }
    cout << count << endl;
    return 0;
}

#include <stdint.h>
#include <bits/stdc++.h> 
#include <ext/pb_ds/assoc_container.hpp>

#define int long long
#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);//cout.precision(dbl::max_digits10);
#define pb(x) push_back(x)
#define mod 1000000007ll //998244353ll
#define vi vector<int>
#define v(x) vector< x >
#define lld long double
#define pii pair<int, int>
#define ff first
#define ss second 
#define endl "\n" 
#define all(x) (x).begin(), (x).end()
#define rep(i,x,y) for(int i=x; i<y; i++)   
#define repe(i,x,y) for(int i=x; i<=y; i++)    
#define fill(a,b) memset(a, b, sizeof(a))
#define setbits(x) __builtin_popcountll(x)
#define print2d(dp,n,m) for(int i=0;i<=n;i++){for(int j=0;j<=m;j++)cout<<dp[i][j]<<" ";cout<<"\n";}

typedef std::numeric_limits< double > dbl;
using namespace __gnu_pbds;
using namespace std;
lld pi=3.1415926535897932;

/*-----------------------------------------------------------*/

int solve(){
	int n,k,x;
	cin>>n>>k>>x;
	return max(n+k,max(k+x,x+n));
}

int32_t main(){
	IOS
	
	int t=1;
	// cin>>t;
	// while(t--)
	// if(!solve())
	// cout<<"NO"<<endl;
	
	while(t--) 
	// solve();
	cout<<solve()<<endl;
	
	return 0;
}