#include <bits/stdc++.h>
int _ = (std::cin.tie(nullptr), std::ios::sync_with_stdio(false),
         std::cout.precision(10), std::cout.setf(std::ios::fixed));
using ll = long long;
using ld = long double;
using namespace std;
int main() {
  int N;
  string S;
  cin >> N >> S;
  int answer = 0;
  for (int i = (0); i < int(N - 1); ++i) {
    const auto T = S.substr(i, 2);
    answer = answer + ((T == "#.") ? 1 : 0);
  }
  cout << answer << endl;
  return 0;
}
