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