#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int solve() {
  int ans1{}, ans2{};
  string s2 = s;
  for (size_t i = 1; i < s.size(); ++i) {
    if (s[i] == '.' && s[i - 1] == '#') {
      s[i] = '#';
      ans1++;
    }
  }
  return ans1;
}
int main() {
  cin >> n >> s;
  cout << solve() << endl;
}
