#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, k = 0;
  string s;
  cin >> n >> s;
  int X = 0;
  for (i = 0; i < n; i++) {
    if (s[i] == '.') {
      k = k + 1;
    }
    if (s[i] == '#') {
      break;
    }
  }
  for (i = k; i < n; i++) {
    if (s[i] == '.') {
      X = X + 1;
    }
  }
  cout << X;
}
