#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll f(ll n, ll x) { return n / x; }
void solve() {
  int n;
  string s;
  cin >> n;
  cin >> s;
  int ans = 0;
  for (int i = 0; i + 1 < n; i++) {
    if (s.substr(i, 2) == "#.") ans++;
  }
  cout << ans << endl;
}
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  int testcase = 1;
  for (int i = 0; i < testcase; i++) {
    solve();
  }
  return 0;
}
