#include <bits/stdc++.h>
using namespace std;
int ans, n;
void func(long long x, int counter) {
  if (x > n) return;
  if (counter == 7) ans++;
  func(x * 10 + 3, counter | 4);
  func(x * 10 + 5, counter | 2);
  func(x * 10 + 7, counter | 1);
}
vector<int> allcount(1000000);
int main() {
  int n;
  string s;
  cin >> n >> s;
  int num = 0;
  for (int(i) = 0; (i) < (n); (i)++) {
    if (s[i] == '.') {
      num++;
    }
    allcount[i] = num;
  }
  int minnum = 1000000000;
  for (int(i) = 0; (i) < (n); (i)++) {
    int num = i + 1 - allcount[i] + (allcount[n - 1] - allcount[i]);
    minnum = (((minnum) > (num)) ? (num) : (minnum));
  }
  cout << minnum << endl;
}
