//#pragma GCC optimize("O3")
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("avx,avx2")
#include<bits/stdc++.h>
//#include<chrono>
//#include<random>
constexpr auto INF = 9223372036854775807;
typedef long long int ll;
typedef unsigned long long int ull;

#define f(i,a,b) for(ll i=(ll)a;i<(ll)b;i+=1)
#define rf(i,a,b) for(ll i=(ll)a;i>=(ll)b;i-=1)
#define endl '\n'
#define MaxN 100005
#define N (ll)998244353 // prime modulo value 
#define all(x) x.begin(),x.end()
#define watch(x) cout << (#x) << " is " << (x) << endl
using namespace std;
auto seed = chrono::high_resolution_clock::now().time_since_epoch().count();
mt19937 mt(seed);

int myrand(int mod) {
	return mt()%mod;
}

inline ll gcd(ll a, ll b)
{
	// This is code taken from geeksforgeek
	if (b == 0)
		return a;
	return gcd(b, a % b);
}

ll mod_power(ll x, ll y)
{
	// This is code taken from geeksforgeek
	ll res = 1;

	x = x % N;
	if (x == 0) return 0;
	while (y > 0)
	{
		if (y & 1)
			res = (res * x) % N;
		y = y >> 1;
		x = (x * x) % N;
	}
	return res;
}
long long modInverse(long long n)
{
	return mod_power(n, N - 2);
}

// Returns nCr % p using Fermat's little 
// theorem. 
long long nCrModPFermat(long long n,
	ll r)
{
	// This is code taken from geeksforgeek
	if (r == 0)
		return 1;
	vector<ll> fac(n + 1, 0);
	fac[0] = 1;
	for (int i = 1; i <= n; i++)
		fac[i] = (fac[i - 1] * i) % N;

	return (fac[n] * modInverse(fac[r]) % N * modInverse(fac[n - r]) % N) % N;
}


bool isprime(ll n)
{
	if (n == 2)
		return true;
	if (n % 2 == 0 || n == 1)
	{
		return false;
	}
	for (ll j = 3; j <= sqrt(n); j += 2)
	{
		if (n % j == 0)
		{
			return false;
		}
	}
	return true;
}



int main()
{
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	//freopen("inputD.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	// __int128
	ll h,w;
	cin>>h>>w;
	vector<string> arr(h,"");
	for(ll i=0;i<h;i+=1)cin>>arr[i];
	ll x=0,y=0;
	ll cnt=0;
	if(arr[0][0]=='*')cnt+=1;
	while(1)
	{
		ll mini=INF,a,b;
		for(ll i=x;i<h;i+=1)
		{
			for(ll j=y;j<w;j+=1)
			{
				if(i==x && j==y)continue;
				if(arr[i][j]=='*')
				{
					ll dist=abs(i-x)+abs(j-y);
					if(mini>dist){mini=dist;a=i;b=j;}
				}
			}
		}
		if(mini!=INF){cnt+=1;x=a;y=b;}
		else break;
	}cout<<cnt;

	return 0;
}
