#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
string s;
int c1, c2, ans, n;
int main() {
  cin >> n >> s;
  ans = n;
  for (int i = 0; i < n; i++) c2 += (s[i] == '.');
  ans = min(c2, n - c2);
  cout << ans;
}
