#include <bits/stdc++.h>
using namespace std;
void mmin(long long &a, long long b) { a = min(a, b); }
void mmax(long long &a, long long b) { a = max(a, b); }
long long calc_dis(string s1, string s2, long long N) {
  long long dis = 0;
  for (long long i = 0; i < N; i++) {
    if (s1[i] != s2[i]) {
      dis++;
    }
  }
  return dis;
}
signed main() {
  long long pr = 1000;
  pr *= pr * pr;
  pr += 7;
  long long N;
  string S;
  cin >> N;
  cin >> S;
  long long min_value = N;
  long long dis = 0;
  for (long long i = 0; i < N + 1; i++) {
    string cand(N, '#');
    for (long long j = 0; j < N; j++) {
      if (j < i) {
        cand[j] = '.';
      }
    }
    dis = calc_dis(S, cand, N);
    if (min_value > dis) min_value = dis;
  }
  cout << min_value;
  return 0;
}
