#include <bits/stdc++.h>
int main() {
  int a, b, s = 0;
  char c[200005];
  scanf("%d", &a);
  scanf("%s", c);
  for (int i = 0; i < a; i++) {
    int k = 0;
    if (c[i] == '#')
      for (int j = i + 1; j < a; j++) {
        if (c[j] == '.') {
          for (int k = j; k < a; k++)
            if (c[k] == '#') {
              i = k;
              s++;
              break;
            }
        }
      }
  }
  printf("%d", s);
}
