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