#include <iostream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <cstring>
#include <algorithm>
#include <math.h>

using namespace std;

typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

#define FOR(i,n,m) for(int i=n; i<(int)m; i++)
#define ROF(i,n,m) for(int i=n; i>(int)m; i--)
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define F first
#define S second
#define ri(a) scanf("%d",&a)
#define rii(a,b) ri(a),ri(b)
#define riii(a,b,c) rii(a,b),ri(c)
#define lri(a) scanf("%lld",&a)
#define lrii(a,b) lri(a),lri(b)
#define ms(obj,val) memset(obj,val,sizeof(obj))
#define all(x) x.begin(),x.end()
#define debug true
#define dprintf debug && printf

const int INF = 0x3f3f3f3f;
const ll INFLL = 1e18;
const int MOD = 1e9+7;
const int MAXN = 2e5+5;

char s[11][11];
int n, m;

int main(){
    //ios_base::sync_with_stdio(false);
    //cin.tie(NULL);

    rii(n, m);
    FOR(i,0,n) scanf("%s", s[i]);

    int i = 0, j = 0;
    int ans = 0;

    while(i != n-1 && j != m-1) {
        ans += (s[i][j] == '*');
        if (s[i+1][j] == '*') i++;
        else j++;
    }
    while(i != n-1) {
        ans += (s[i][j] == '*');
        i++;
    }
    while(j != m-1) {
        ans += (s[i][j] == '*');
        j++;
    }
    ans += (s[i][j] == '*');
    printf("%d\n", ans);

    return 0;
}
