javascript greedy direct way 68ms
\nconst minimumMoves = (s) => {\n    let res = 0, n = s.length;\n    for (let i = 0; i < n;) {\n        if (s[i] == \'X\') { // if find X, we can do max 3 chang
```\nconst minimumMoves = (s) => {\n    let res = 0, n = s.length;\n    for (let i = 0; i < n;) {\n        if (s[i] == \'X\') { // if find X, we can do max 3 change from "X" -> "O", no matter it is "X" or "O" in i+1 and i+2, will count 1 operation\n            i += 3;\n            res++;\n        } else {\n            i++;\n        }\n    }\n    return res;\n};\n```
['Greedy', 'JavaScript']