#include <bits/stdc++.h>
using namespace std;
long search(long l, string s, char c) {
  long n = s.size();
  long num = 0;
  if (l == n)
    num = 0;
  else {
    for (long i = l; i < n; i++) {
      if (s[i] == c) {
        num++;
      }
    }
  }
  return num;
}
long search_2(long l, string s, char c) {
  long n = s.size();
  long num = 0;
  if (l == 0)
    num = 0;
  else {
    for (long i = l - 1; i >= 0; i--) {
      if (s[i] == c) {
        num++;
      }
    }
  }
  return num;
}
long first(string s) {
  long n = s.size();
  long num = 0;
  long i = 0;
  while (i < n) {
    if (s[i] != '#') {
      i++;
    } else
      break;
  }
  return i;
}
long last(string s) {
  long n = s.size();
  long num = 0;
  long i = n - 1;
  while (i >= 0) {
    if (s[i] != '.') {
      i--;
    } else
      break;
  }
  return i;
}
int main() {
  long n, j, num;
  j = 0;
  num = 0;
  string s;
  cin >> n >> s;
  long ans[n];
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '#' && s[i + 1] == '.') {
      long w = search(i, s, '.');
      long b = search_2(i, s, '#');
      ans[j] = w + b;
      if (j != 0)
        num = ((ans[j]) < (ans[j - 1]) ? (ans[j]) : (ans[j - 1]));
      else
        num = ans[0];
      cout << ans[j] << endl;
      j++;
    }
  }
  cout << num << endl;
}
