#include <bits/stdc++.h>
using namespace std;
const long long INF = 99999999999999;
const int inf = 999999999;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  bool f = 0;
  char x, pre = 'a';
  int cnt1 = 0, cnt2 = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (f == 0) {
      if (x != pre) {
        if (x == '.')
          cnt1++;
        else
          cnt2++;
      }
    } else {
      if (x == '.')
        cnt1++;
      else
        cnt2++;
    }
  }
  cout << min(cnt1, cnt2) << "\n";
  return 0;
}
