#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int n, ans1 = 0, ans2 = 0;
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '.') {
      ans1++;
    } else {
      ans2++;
    }
  }
  if (ans1 == n || ans2 == n) {
    cout << 0;
    return 0;
  }
  if (ans1 < ans2) {
    cout << ans1;
  } else {
    cout << ans2;
  }
  return 0;
}
