#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  string S;
  cin >> N;
  cin >> S;
  int count = 0;
  int i = 0;
  while (S[i] == '.') {
    i++;
  }
  for (int j = i; j < N - 1; j++) {
    if (S[j + 1] == '.') {
      S.replace(j + 1, 1, "#");
      count = count + 1;
    }
  }
  cout << count;
  return 0;
}
