#include <bits/stdc++.h>
int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main() {
  int a, b, c, d, e, f;
  int A[2000001] = {};
  int B[2000001] = {};
  int ans[100003] = {};
  int sum[100003] = {};
  int cnt_flag[100003] = {};
  int L[1003] = {};
  long long JPY;
  double BTC;
  char s[20000001] = {};
  char t[200001] = {};
  char u[200001] = {};
  int i, j, k, point;
  int point_A = 0, point_B = 0;
  int flag = 0;
  int tmp = 0;
  int min = 10;
  int len = 0;
  int cnt = 0;
  int cnt0 = 0;
  int cnt1 = 0;
  int num = 0;
  int max = 0;
  scanf("%d", &a);
  scanf("%s", &s);
  for (i = 0; i < a; i++) {
    if (s[i] == '.')
      cnt0++;
    else
      cnt1++;
  }
  if (cnt0 >= cnt1)
    min = cnt1;
  else
    min = cnt0;
  printf("%d\n", min);
  return 0;
}
