#include <bits/stdc++.h>
using namespace std;
int N, ans1 = 0, ans2 = 0;
string S;
int main() {
  cin >> N;
  cin >> S;
  int j = 0;
  while (S[j] == '.') j++;
  for (int i = j; i < S.length(); i++) {
    if (S[i] == '.')
      ans1++;
    else
      ans2++;
  }
  cout << min(ans1, ans2) << endl;
  return 0;
}
