#include <bits/stdc++.h>
using namespace std;
int sum_digits(int num);
template <class T>
vector<T> copy_vector(vector<T> vec);
int gcd(int a, int b);
int main() {
  int n;
  string s;
  cin >> n >> s;
  int cnt = 0;
  if (s[0] == '#' && s[1] == '.') {
    cnt++;
  }
  for (int i = 1; i < n - 2; i++) {
    if (s[i] == '#' && s[i] == '.') {
      s[i] = '#';
      cnt++;
    }
  }
  if (s[n - 2] == '#' && s[n - 1] == '.') {
    cnt++;
  }
  cout << cnt << endl;
  return 0;
}
int sum_digits(int num) {
  int rtn = 0;
  while (num != 0) {
    int tmp = num % 10;
    rtn += tmp;
    num /= 10;
  }
  return rtn;
}
template <class T>
vector<T> copy_vector(vector<T> vec) {
  vector<T> rtn;
  rtn.reserve(vec.size());
  copy(vec.begin(), vec.end(), back_inserter(rtn));
  return rtn;
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
