#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INF = 1000000000000000;
long long ma = 1000000000 + 7;
long long h, w, n, m, k;
string s;
string sp;
char maze[60][60];
int dis[60][60];
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main() {
  cin >> n >> s;
  bool flgs = false, flgd;
  long long res1 = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '#') {
      flgs = true;
      flgd = false;
    } else {
      if (flgs) {
        res1++;
        s[i] = '#';
        flgs = true;
      } else {
        flgs = false;
      }
      flgd = true;
    }
  }
  cout << res1 << endl;
}
