#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, n, x = 0, cnt = 0;
  string s;
  cin >> n;
  cin >> s;
  for (; n > 0; n--) {
    if (s[cnt] == '#' && s[cnt + 1] == '.') {
      x++;
      s[cnt + 1] = '#';
    }
    cnt++;
  }
  cout << x << endl;
  return (0);
}
