import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in); String input1= s.nextLine(); String input2 = s.nextLine(); String split3 = input1.toUpperCase().replaceAll(input2.toUpperCase(),""); System.out.println(input1.length() - split3.length()); } }