#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int n;
  cin >> n;
  cin >> s;
  int cnt = 0;
  int dum;
  size_t found = s.find('.');
  if (found == string::npos) {
    dum = static_cast<int>(found);
  } else {
    dum = 0;
  }
  if (dum == 0)
    cout << cnt << endl;
  else {
    for (int i = dum; i < s.size(); i++) {
      if (s[i] == '.') cnt++;
    }
    cout << cnt << endl;
  }
}
