#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int i = 0;
  int ans = 0;
  while (i < n && s.at(i) == '.') i++;
  while (i < n) {
    if (s.at(i) == '.') ans += 1;
    i++;
  }
  cout << ans << endl;
}
