#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  bool flag = false;
  int ans = 99999999;
  int tmp_ans = 0;
  int ans2 = 0;
  string tmp = "#.";
  for (int d = 0; d < (int)(n); d++) {
    tmp_ans = 0;
    int count = 0;
    flag = false;
    for (int i = 0; i < (int)(n); i++) {
      if (flag) {
        if (s[i] != tmp[0]) tmp_ans++;
      } else {
        if (count == d && s[i] == tmp[0])
          flag = true;
        else {
          if (s[i] == tmp[0]) {
            count++;
            tmp_ans++;
          }
        }
      }
    }
    if (ans > tmp_ans) ans = tmp_ans;
  }
  cout << ans << endl;
}
