{"raw_statement":[{"iden":"background","content":"> 友情是什么？  \n> 风不知道。  \n> 但当友情让爱情出现猜忌  \n> 风选择因友情而终结友情"},{"iden":"statement","content":"字符串 $S$ 是一个仅由英文小写字母构成的串。现在，你可以对字符串 $S$ 执行任意次如下操作：\n\n- 选择 $S$ 长度为 $4$ 的一个子串，将其替换为 `love`。\n\n请问，至少操作多少次，字符串 $S$ 不再有子串 `friend`。\n\n> 定义：子串指的是一个字符串中连续的一段字符序列。例如，字符串 `aabbcc` 有子串 `aab`、`aabb`，但 `abc` 不是字符串 `aabbcc` 的子串，因为其不连续。"},{"iden":"input","content":"输入一行一个字符串 $S$。"},{"iden":"output","content":"输出一行一个整数，表示最少操作次数。"},{"iden":"note","content":"对于 $20\\%$ 的测试数据，$1 \\le |S| \\le 6$；  \n对于 $100\\%$ 的测试数据，$1 \\le |S| \\le 10^6$，$S$ 仅由小写英文字母组成。"}],"translated_statement":null,"sample_group":[["friend\n","1\n"],["friendzdxfriend\n","2\n"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}