#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int res = 0, idx = 0;
  for (; idx < n && s[idx] == '.'; idx++) {
  }
  for (; idx < n; idx++) {
    if (s[idx] == '.') {
      res++;
    }
  }
  cout << res << endl;
}
