#include <bits/stdc++.h>
using namespace std;
struct CinInit {
  CinInit() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(20);
  };
} CinInit;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int i = 0, cnt = 0;
  while (s[i] == '.') i++;
  for (; i < n; i++) {
    if (s[i] == '.') cnt++;
  }
  cout << cnt << "\n";
  return 0;
}
