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