#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, ans, count;
  string S, T;
  cin >> N >> S;
  ans = N;
  for (int i = 0; i < N; i++) {
    T[i] = '#';
  }
  for (int i = 0; i <= N; i++) {
    count = 0;
    for (int j = 0; j < N; j++) {
      if (S[j] != T[j]) count++;
    }
    ans = min(ans, count);
    T[i] = '.';
  }
  cout << ans << endl;
}
