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