#include <bits/stdc++.h>
using namespace std;
struct aaa {
  aaa() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
  };
} aaaaaaa;
const int INF = 1001001001;
const long long LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7;
const double EPS = 1e-9;
const int dx[] = {1, 1, 0, -1, -1, -1, 0, 1},
          dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
signed main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int cnt{};
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] == '#') {
      if (s[i + 1] == '.') {
        ++cnt;
      }
    }
  }
  cout << cnt << endl;
  return 0;
}
