#include <bits/stdc++.h>
using namespace std;
long long dp[50][2] = {0};
int main(void) {
  int n;
  string s;
  cin >> n >> s;
  int num = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '.') num++;
  }
  cout << min(n - num, num) << endl;
}
