#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, minimum, black, white;
  string S;
  cin >> N >> S;
  black = 0;
  white = 0;
  for (int i = 0; i < N; i++) {
    if (S.at(i) == '.') {
      white++;
    } else {
      black++;
    }
  }
  int sum = white;
  minimum = min(black, white);
  cout << minimum << endl;
  for (int i = 1; i < N; i++) {
    if (S.at(i - 1) == '.') {
      white--;
    }
    if (S.at(i) == '#') {
      white++;
    }
    sum = min(sum, white);
  }
  minimum = min(minimum, sum);
  cout << minimum << endl;
}
