#include <bits/stdc++.h>
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int h, w; cin >> h >> w;
    vector<str> v(h);
    for(str &s: v) cin >> s;
    pair<int, int> cur = {0, 0};
    int ans = 0;
    if(v[0][0] == '*') ans++;
    while(1){
        vector<pair<int, int>> next;
        int dis = 100, south = 100;
        for(int i = cur.f; i < h; i++) for(int j = cur.sc; j < w; j++){
            if(i == cur.f && j == cur.sc) continue;
            if(v[i][j] == '*') next.pb({i, j});
        }
        if(next.empty()) break;
        ans++;
        sort(next.begin(), next.end(), [&](pair<int, int> a, pair<int, int> b){
            return make_pair(a.f+a.sc-cur.f-cur.sc, a.f-cur.f) < make_pair(b.f+b.sc-cur.f-cur.sc, b.f-cur.f);
        });
        cur = next.front();
    }
    cout << ans << "\n";
}