#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long N;
  cin >> N;
  string str;
  cin >> str;
  long long ca = 0, cb = 0;
  long long a = 0;
  for (long long i = 0; i < N; i++) {
    if ((char)str[i] != '.') {
      a = i;
      break;
    }
  }
  for (long long i = a; i < N; i++) {
    if ((char)str[i] == '.') {
      ca++;
    } else {
      cb++;
    }
  }
  cout << min(ca, cb) << endl;
  return 0;
}
