#include <bits/stdc++.h>
using namespace std;
int MOD = 1000000007;
int main() {
  int n = 0;
  string s = "";
  char white = '.';
  bool before_black = false;
  cin >> n >> s;
  int ans = 0;
  for (int i = 0; i < s.length(); i++) {
    if (before_black && s[i] == white) {
      ans++;
    }
    before_black = s[i] != white;
  }
  cout << ans << "\n";
  return 0;
}
