#include <bits/stdc++.h>
int main() {
  int n, i = 0, w = 0, b = 0;
  scanf("%d", &n);
  char s[n + 1];
  scanf("%s", s);
  while (s[i] == '.') i++;
  while (i < n) {
    if (s[i] == '.')
      w++;
    else
      b++;
    i++;
  }
  printf("%d", ((w) < (b) ? (w) : (b)));
}
