var line var num=0 var arr=[] while (line=readline()){ arr.push(line) } arr[0]=arr[0].toUpperCase() for(let i=0;i<arr[0].length;i++){ if(arr[1].toUpperCase()===arr[0][i]){ num++ } } console.log(num)