#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  int count = 0;
  int buff = 0;
  char less, most;
  string s;
  bool all = true;
  cin >> n >> s;
  int scount = 1;
  int pcount = 0;
  for (int j = 0; j < s.size(); ++j) {
    if (all == true) {
      if (s[j] == '#') {
        all = false;
      }
    }
    if (all == false) {
      if (s[j] == '#') {
        scount++;
      } else {
        pcount++;
      }
    }
  }
  if (scount > pcount) {
    cout << pcount;
  } else {
    cout << scount;
  }
  return 0;
}
