#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  char S[N];
  for (int i = 0; i < N; ++i) cin >> S[i];
  vector<int> A;
  if (S[0] == '.') A.push_back(0);
  int count = 0;
  for (int i = N - 1; i >= 0; --i) {
    count++;
    if (S[i] != S[i + 1]) A.push_back(count);
    count = 0;
  }
  int mn = 100000000;
  for (int i = 0; i < (A.size() + 1) / 2; ++i) {
    int count = 0;
    for (int j = 0; j < 2 * i; ++j) {
      if (j % 2 == 0) count += A[j];
    }
    for (int j = 2 * i; j < A.size(); ++j) {
      if (j % 2 == 1) count += A[j];
    }
    mn = min(mn, count);
    count = 0;
  }
  cout << mn << endl;
}
