#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, flag = 0, cnt = 0;
  cin >> n;
  char s;
  for (int(i) = (0); (i) < (n); i++) {
    cin >> s;
    if (flag == 1 && s == '.') cnt++;
    if (s == '#')
      flag = 1;
    else
      flag = 0;
  }
  cout << cnt << endl;
}
