int main(void)
{
  int N,i,j,white=0,black=0,count=0;
  scanf("%d",&N);
  char S[200000];
  for(i=0;i<N;i++){
    scanf("%s",&S[i]);
  }
  for(j=0;j<N;j++){
    if(S[j]=='.'){
      white=white+1;
    }
    if(S[j]=='#'){
      black=black+1;
    }
  }
    if(black>=white){
      count=white;
    }
    else{
      count=black;
    }
  
    printf("%d",count);
      
  return(0);
}