#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<ll, ll> p_ll;

template<class T>
void debug(T itr1, T itr2) { auto now = itr1; while(now<itr2) { cout << *now << " "; now++; } cout << endl; }
#define repr(i,from,to) for (ll i=(ll)from; i<(ll)to; i++)
#define all(vec) vec.begin(), vec.end()
#define rep(i,N) repr(i,0,N)
#define per(i,N) for (ll i=(ll)N-1; i>=0; i--)

const ll MOD = pow(10,9)+7;
const ll LLINF = pow(2,61)-1;
const ll INF = pow(2,30)-1;

vector<ll> fac;
void c_fac(ll x=pow(10,7)+10) { fac.resize(x,true); rep(i,x) fac[i] = i ? (fac[i-1]*i)%MOD : 1; }
ll inv(ll a, ll m=MOD) { ll b = m, x = 1, y = 0; while (b!=0) { ll d = a/b; a -= b*d; swap(a,b); x -= y*d; swap(x,y); } return (x+m)%m; }
ll nck(ll n, ll k) { return fac[n]*inv(fac[k]*fac[n-k]%MOD)%MOD; }
ll modpow(ll x, ll p) { ll result = 1, now = 1, pm = x; while (now<=p) { if (p&now) { result = result * pm % MOD; } now*=2; pm = pm*pm % MOD; } return result; }
ll gcd(ll a, ll b) { if (a<b) swap(a,b); return b==0 ? a : gcd(b, a%b); }
ll lcm(ll a, ll b) { return a/gcd(a,b)*b; }


int main() {
  ll A, B; cin >> A >> B;
  ll result = 2*A+100 - B;
  cout << result << endl;
  return 0;
}
  #include<bits/stdc++.h>
  using namespace std;
  using ll = long long;
  #define rep(i,f,n) for(ll i=(f); (i) < (n); i++)
  #define repe(i,f,n) for(ll i=(f); (i) <= (n); i++)
  #define repc(i,f,n) for(char i=(f); (i) <= (n); i++)
  #define PI 3.14159265358979323846264338327950ll
  #define debug(x) cout<<#x<<" :: "<<x<<"\n";
  #define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
  #define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n";
  #define Pl pair<ll, ll>
  #define dvec vector<vector<ll>>
  #define OUT(x) cout << x << endl; return 0;
  //printf("%.10f\n")
  //cout << fixed << setprecision(10);
  template<class T> inline bool chmax(T& a, T b){if (a < b) { a = b; return true; } return false;}
  template<class T> inline bool chmaxe(T& a, T b){if (a <= b) { a = b; return true; } return false;}
  template<class T> inline bool chmin(T& a, T b){if (a > b) { a = b; return true; } return false;}
  const ll MOD = 1000000007ll;
  const ll INF = 1e+18;
  const int iINF = 1e9;
  const double EPS = 1e-8;

vector<vector<ll>> x, y, z, memo;

ll
f(ll H, ll W, vector<string> &grd)
{
  if(H == 1 && W == 1) return 1;
  if(H < 1 || W < 1) return 0;
  if(grd[H - 1][W - 1] == '#') return 0;
  if(memo[H][W] != -1) return memo[H][W];

  x[H][W] = (f(H - 1, W, grd) + x[H - 1][W] + MOD) % MOD;
  y[H][W] = (f(H, W - 1, grd) + y[H][W - 1] + MOD) % MOD;
  z[H][W] = (f(H - 1, W - 1, grd) + z[H - 1][W - 1] + MOD) % MOD;

  return memo[H][W] = (x[H][W] + y[H][W] + z[H][W] + MOD) % MOD;
}


int
main()
{
  ll H, W; cin >> H >> W;
  vector<string> grd(H);
  rep(i, 0, H) cin >> grd[i];
  x.assign(H + 1, vector<ll>(W + 1, 0));
  y.assign(H + 1, vector<ll>(W + 1, 0));
  z.assign(H + 1, vector<ll>(W + 1, 0));
  memo.assign(H + 1, vector<ll>(W + 1, -1));
  
  cout << f(H, W, grd) << endl;
}