C# LINQ one-liner, O(n)
\npublic class Solution {\n    public int MinimumMoves(string s) \n        => s.Aggregate((res: 0, dist: 3), \n                       (pos, cur) => (pos.res + (
```\npublic class Solution {\n    public int MinimumMoves(string s) \n        => s.Aggregate((res: 0, dist: 3), \n                       (pos, cur) => (pos.res + (cur == \'X\' && pos.dist > 2 ? 1 : 0), \n                                      (cur == \'X\' && pos.dist > 2 ? 1 : pos.dist + 1)),\n                       pos => pos.res);\n}\n```
[]