function Main(input){
  
  var str = input.trim().split("\n");
  var n = parseInt(str[0],10);
  var s = str[1];

  var targetStr = "#." ;

   //console.log( ( s.match( new RegExp( targetStr, "g" ) ) || [] ).length);
var counter = function(str,seq){
    return str.split(seq).length - 1;
}
  var kaisu = counter(s,targetStr);
var checks = s;
  var kekka = kaisu;
  
  while(kaisu>0){
    var checks = checks.replace(/#\./g,"");
     var kaisu =  counter(checks,targetStr) ;
     var kekka = kekka + kaisu;
  }//while end
  
  //var checks = s.replace(/#\./g,"");
  
  
console.log(kekka);
  
  
}//function end
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));