/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
String in
="i have a male cat. the color of male cat is Black"; int i=0;
Pattern p = Pattern.compile("male cat");
Matcher m = p.matcher(in);
while (m.find()) {
i++;
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwucmVnZXguTWF0Y2hlcjsKaW1wb3J0IGphdmEudXRpbC5yZWdleC5QYXR0ZXJuOwovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgogICAgewogICAgCVN0cmluZyBpbiA9ImkgaGF2ZSBhIG1hbGUgY2F0LiB0aGUgY29sb3Igb2YgbWFsZSBjYXQgaXMgQmxhY2siOwogICAgICAgIGludCBpPTA7CiAgICAgICAgUGF0dGVybiBwID0gUGF0dGVybi5jb21waWxlKCJtYWxlIGNhdCIpOwogICAgICAgIE1hdGNoZXIgbSA9IHAubWF0Y2hlcihpbik7CiAgICAgICAgd2hpbGUgKG0uZmluZCgpKSB7CiAgICAgICAgCWkrKzsKICAgICAgICAgICAgCiAgICAgICAgfQogICAgU3lzdGVtLm91dC5wcmludGxuKGkpOwoJCQoJfQp9