#include<stdio.h>

int main(){
  long int a,siro=0,kuro=0,i;
  char b[20001],e;
  scanf("%ld\n%s",&a,b);
  for (i=1;i<=a;i++){
    if(b[i-1]=='.'){
      siro++;
    }else{
      kuro++;
    }
  }
  for (i=1;i<=a;i++){
    if(b[i-1]!="."){
      break;
    }
    siro--;
  }
  printf("%ld",siro);
  return 0;
} 
