#include <bits/stdc++.h>
int main() {
  int N;
  char s[200001];
  int i;
  int j = 1;
  int ans = 200001;
  int pos[2][200001];
  int w = 0, b = 0;
  printf("yes");
  scanf("%d", &N);
  scanf("%s", s);
  s[N] = '#';
  for (i = 0; i < N; i++) {
    if (s[i] == '#')
      b++;
    else
      w++;
    if (s[i] == '.' && s[i + 1] == '#') {
      pos[0][j] = w;
      pos[1][j] = b;
      j++;
    }
  }
  int okikae = 0;
  for (i = 1; i < j; i++) {
    okikae = pos[1][i] + (pos[0][j] - pos[0][i]);
    if (ans > okikae) ans = okikae;
  }
  printf("%d\n", ans);
  return 0;
}
