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