#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cstdlib>
#include<queue>
#include<set>
#include<cstdio>
#include<map>
#include<cassert>

using namespace std;

#define ll long long
#define reps(i, a, b) for(int i = a; i < b; i++)
#define rreps(i, a, b) for(int i = a-1; i >= b; i--)
#define rep(i, n) reps(i, 0, n)
#define rrep(i, n) rreps(i, n, 0)
#define P pair<int, int>
#define vec vector<int>
#define mat vector<vec>

const ll mod = 1000000007;
const int INF = 1001001001;

struct mint {
    ll x;
    mint(ll x=0):x((x%mod+mod)%mod){}
    mint operator-() const { return mint(-x);}
    mint& operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += mod-a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const mint a) {
        (x *= a.x) %= mod;
        return *this;
    }
    mint operator+(const mint a) const {
        mint res(*this);
        return res+=a;
    }
    mint operator-(const mint a) const {
        mint res(*this);
        return res-=a;
    }
    mint operator*(const mint a) const {
        mint res(*this);
        return res*=a;
    }
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t>>1);
        a *= a;
        if (t&1) a *= *this;
        return a;
    }

    // for prime mod
    mint inv() const {
        return pow(mod-2);
    }
    mint& operator/=(const mint a) {
        return (*this) *= a.inv();
    }
    mint operator/(const mint a) const {
        mint res(*this);
        return res/=a;
    }
};
istream& operator>>(istream& is, const mint& a){ return is >> a.x; }
ostream& operator<<(ostream& os, const mint& a){ return os << a.x; }

int main(){
    int h, w;
    cin >> h >> w;
    string s[h];
    rep(i, h) cin >> s[i];
    // 0: そこ, 1: 縦, 2: 横, 3: 斜め
    vector<vector<vector<mint> > > dp(h, vector<vector<mint> >(w, vector<mint>(4)));
    dp[0][0][0] = 1;
    dp[0][0][1] = 1;
    dp[0][0][2] = 1;
    dp[0][0][3] = 1;
    rep(i, h-1) {
        if(s[i+1][0]  == '#') continue;
        dp[i+1][0][0] = dp[i][0][1];
        dp[i+1][0][1] = dp[i][0][1] + dp[i+1][0][0];
        dp[i+1][0][2] = dp[i+1][0][0];
        dp[i+1][0][3] = dp[i+1][0][0];
    }
    rep(j, w-1) {
        if(s[0][j+1]  == '#') continue;
        dp[0][j+1][0] = dp[0][j][2];
        dp[0][j+1][1] = dp[0][j+1][0];
        dp[0][j+1][2] = dp[0][j][2] + dp[0][j+1][0];
        dp[0][j+1][3] = dp[0][j+1][0];
    }
    rep(i, h-1){
        rep(j, w-1){
            if(s[i+1][j+1] == '#') continue;
        dp[i+1][j+1][0] = dp[i][j+1][1] + dp[i+1][j][2] + dp[i][j][3];
        dp[i+1][j+1][1] = dp[i][j+1][1] + dp[i+1][j+1][0];
        dp[i+1][j+1][2] = dp[i+1][j][2] + dp[i+1][j+1][0];
        dp[i+1][j+1][3] = dp[i][j][3] + dp[i+1][j+1][0];
        }
    }
    // rep(i, h){
    //     rep(j, w){
    //         cout << dp[i][j][0] << " ";
    //     }cout << endl;
    // }

    cout << dp[h-1][w-1][0] << endl;
}
#include <bits/stdc++.h>

using namespace std;

double dp[105][105][105];

int main() {
	int a, b, c;
	scanf("%d%d%d", &a, &b, &c);
	
	for (int i = 99; i >= 0; i--) {
		for (int j = 99; j >= 0; j--) {
			for (int k = 99; k >= 0; k--) {
				int tot = i + j + k;
				dp[i][j][k] = (1.0 * i / tot) * (dp[i + 1][j][k] + 1) + (1.0 * j / tot) * (dp[i][j + 1][k] + 1) + (1.0 * k / tot) * (dp[i][j][k + 1] + 1);
			}
		}
	}
	
	printf("%.12lf\n", dp[a][b][c]);
}
