#include <bits/stdc++.h>
using namespace std;
const static int MAX = 200000;
int n, i = 0, j, c;
char S[MAX];
string s;
int main() {
  scanf("%d", &n);
  scanf("%s", S);
  s = S;
  while (s[i] == '#' and i < n) {
    i++;
  }
  for (j = i; j < n; j++) {
    if (s[j] == '#') {
      c++;
    }
  }
  printf("%d\n", c);
  return 0;
}
