#include <bits/stdc++.h>
using namespace std;
int read() {
  char ch = getchar();
  int x = 0, f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while ('0' <= ch && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  int n;
  cin >> n;
  getchar();
  string s;
  cin >> s;
  int ans = 0;
  for (int i = s.length() - 1; i >= 0; i--) {
    if (s[i] == '#' && s[i + 1] == '.') ans++;
  }
  cout << ans;
}
