import java.util.*;
import java.io.*;

public class P2
{
	public static void main(String[] args) throws IOException
	{
		Scanner in = new Scanner(new FileReader("DATA2.txt"));
		PrintWriter out = new PrintWriter(new FileWriter("OUT2.txt"));

		while (in.hasNext())
		{
			char [] letters = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};

			int wordCount = 0;

			String text = in.nextLine();
			text = text.toLowerCase();

			StringTokenizer st = new StringTokenizer(text);

			while (st.hasMoreTokens())
			{
				String temp = st.nextToken();
				for (int i = 0; i < temp.length(); i++)
				{
					if (!Character.isLetter(temp.charAt(i)))
					{
						temp = temp.substring(0, i) + temp.substring(i + 1);
					}
				}

				if (!Character.isLetter(temp.charAt(temp.length() - 1)))
					temp = temp.substring(0, temp.length() - 1);


				System.out.println(temp);
				if (temp.length() > 3)
				wordCount++;

			}

			out.println(wordCount);
		}
		out.close();
	}
}
