#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<ll, ll>;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n;
  cin >> n;
  string s;
  cin >> s;
  s += '#';
  ll i = 0, cnt = 0;
  for (; s[i] == '.'; i++)
    ;
  for (; i <= n; i++)
    if (s[i] == '.') cnt++;
  cout << cnt << "\n";
  return 0;
}
