#include <bits/stdc++.h>
using namespace std;
template <typename T>
void cmin(T &a, T b) {
  a = min(a, b);
}
template <typename T>
void cmax(T &a, T b) {
  a = max(a, b);
}
const long long mod = 998244353;
signed main() {
  long long n;
  string s;
  cin >> n >> s;
  long long ans = 0;
  long long idx = 0;
  long long cnt = 0;
  while (s[idx] == '.' && idx < s.size()) idx++;
  for (; idx < s.size(); idx++) {
    if (s[idx] == '.')
      ans++;
    else
      cnt++;
  }
  cout << min(ans, cnt) << endl;
  return 0;
}
