{"problem":{"name":"Unification","description":{"content":"There are $N$ cubes stacked vertically on a desk. You are given a string $S$ of length $N$. The color of the $i$\\-th cube from the bottom is red if the $i$\\-th character in $S$ is `0`, and blue if tha","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc120_c"},"statements":[{"statement_type":"Markdown","content":"There are $N$ cubes stacked vertically on a desk.\nYou are given a string $S$ of length $N$. The color of the $i$\\-th cube from the bottom is red if the $i$\\-th character in $S$ is `0`, and blue if that character is `1`.\nYou can perform the following operation any number of times: choose a red cube and a blue cube that are adjacent, and remove them. Here, the cubes that were stacked on the removed cubes will fall down onto the object below them.\nAt most how many cubes can be removed?\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^5$\n*   $|S| = N$\n*   Each character in $S$ is `0` or `1`.\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":"abc120_c","tags":[],"sample_group":[["0011","4\n\nAll four cubes can be removed, by performing the operation as follows:\n\n*   Remove the second and third cubes from the bottom. Then, the fourth cube drops onto the first cube.\n*   Remove the first and second cubes from the bottom."],["11011010001011","12"],["0","0"]],"created_at":"2026-03-03 11:01:14"}}