#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const long long mod = 1e9 + 7;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  string s;
  cin >> n >> s;
  long long c = 0;
  s = '$' + s;
  for (long long i = 1; i <= n; i++) {
    if (s[i] == '.') {
      if (s[i - 1] == '#') {
        s[i] = '#';
        c++;
      }
    }
  }
  cout << c;
  return 0;
}
