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