#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  string s;
  cin >> n;
  cin >> s;
  int c = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') {
      for (int j = i; j < n; j++) {
        if (s[j] == '.') {
          c++;
        }
      }
      break;
    }
  }
  cout << c << endl;
  return 0;
}
