#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[300000];
  int N;
  int count1 = 0, count2 = 0;
  scanf("%d", &N);
  fflush(stdin);
  scanf("%s", s);
  for (int i = 0; i < N; i++) {
    if (s[i] == '.') {
      count1++;
    } else {
      count2++;
    }
  }
  if (count1 < count2) {
    printf("%d\n", count1);
  } else {
    printf("%d\n", count2);
  }
  return 0;
}
