#include <bits/stdc++.h>
using namespace std;
const long long LINF = 1e18L + 1;
const int INF = 1e9 + 1;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int w = 0;
  int lastWhite = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '.') {
      lastWhite = i;
      break;
    }
  }
  for (int i = 0; i < (lastWhite + 1); ++i) {
    if (s[i] == '.') w++;
  }
  cout << min(w, lastWhite - w + 1) << endl;
  return 0;
}
