//Rosa Enciso
// Solution to 2007 BHCSI Mock Contest #2 Problem Frequency

import java.io.*;
import java.util.*;

public class freq
{

	public static void main (String [] args) throws IOException
	{
		Scanner input = new Scanner(new File("freq.in"));
		char letter = input.nextLine().charAt(0);	//read character
		String text = input.nextLine();			//read text from file

		int counter = 0;	//initialize counter to 0

		for(int i = 0;i<text.length();i++)
		{
			//if character at position i is equal to letter increment counter
			if(text.charAt(i) == letter)
				counter++;
		}

		System.out.println("The letter \'" + letter + "\' appears " + counter +" times in the text below:\n\n\"" + text + "\"");
		fin.close();
	}
}