#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
signed main(void) {
  int n, m, cnt, tmp;
  string s;
  cin >> n >> s;
  m = tmp = n - 1;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '.') tmp = i;
    m = tmp;
  }
  cnt = 0;
  for (int i = m; i < n; i++) {
    if (s[i] == '#') cnt++;
  }
  cout << cnt << endl;
  return 0;
}
