#include <bits/stdc++.h>
using namespace std;
int main() {
  int ans = 0;
  int N;
  string S;
  cin >> N;
  cin >> S;
  vector<char> c;
  int a = 0, b = 0;
  for (int i = 0; i < N; i++) {
    c.push_back(S[i]);
  }
  a = count(c.begin(), c.end(), '.');
  b = count(c.begin(), c.end(), '#');
  ans = min(a, b);
  cout << ans;
}
