#include <bits/stdc++.h>
using namespace std;
template <typename T>
class vec2d : public vector<vector<T>> {
 public:
  vec2d(int H, int W) : vector<vector<T>>(H, vector<T>(W)) {}
};
template <typename T>
istream& operator>>(istream& is, vector<T>& vec) {
  for (T& x : vec) is >> x;
  return is;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
  for (int i = (0); i < (vec.size()); i++) {
    os << vec[i] << (i + 1 == vec.size() ? "" : " ");
  }
  return os;
}
struct aaa {
  aaa() {
    cin.tie(0);
    ios::sync_with_stdio(0);
  };
} aaaaaaa;
signed main(signed argc, char** argv) {
  int N;
  cin >> N;
  char S[N + 1];
  cin >> S;
  int mode = 1;
  int ans = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] == '#') {
      mode = 0;
    }
    if (S[i] == '.' && mode == 0) {
      ans++;
      mode = 1;
    }
  }
  cout << ans << endl;
  return 0;
}
