{"problem":{"name":"Dividing a String","description":{"content":"Given is a string $S$ consisting of lowercase English letters. Find the maximum positive integer $K$ that satisfies the following condition: *   There exists a partition of $S$ into $K$ non-empty str","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"agc037_a"},"statements":[{"statement_type":"Markdown","content":"Given is a string $S$ consisting of lowercase English letters. Find the maximum positive integer $K$ that satisfies the following condition:\n\n*   There exists a partition of $S$ into $K$ non-empty strings $S=S_1S_2...S_K$ such that $S_i \\neq S_{i+1}$ ($1 \\leq i \\leq K-1$).\n\nHere $S_1S_2...S_K$ represents the concatenation of $S_1,S_2,...,S_K$ in this order.\n\n## Constraints\n\n*   $1 \\leq |S| \\leq 2 \\times 10^5$\n*   $S$ consists of lowercase English letters.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$S$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"agc037_a","tags":[],"sample_group":[["aabbaa","4\n\nWe can, for example, divide $S$ into four strings `aa`, `b`, `ba`, and `a`."],["aaaccacabaababc","12"]],"created_at":"2026-03-03 11:01:14"}}