#include <bits/stdc++.h>
using namespace std;
struct pairhash {
 public:
  template <typename tuple<int, int, int>, typename U>
  size_t operator()(const pair<tuple<int, int, int>, U> &x) const {
    size_t seed = hash<tuple<int, int, int> >()(x.first);
    return hash<U>()(x.second) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
  }
};
const int inf = 1e9 + 9;
const long long mod = 1e9 + 7;
const double eps = 1e-8;
const double pi = acos(-1);
int n;
string s;
int solve() {
  int idx = 0;
  while (idx < n && s[idx] == '.') idx++;
  int res = 0;
  for (int i = idx; i < n; i++) {
    if (s[i] == '.') res++;
  }
  return res;
}
void input() { cin >> n >> s; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  input();
  cout << solve() << '\n';
}
