simple C++
```\nclass Solution {\npublic:\n    int minimumMoves(string s) {\n        int n=s.size();\n        \n        int ans=0;\n        for(int i=0; i<n;)\n        {\n
```\nclass Solution {\npublic:\n    int minimumMoves(string s) {\n        int n=s.size();\n        \n        int ans=0;\n        for(int i=0; i<n;)\n        {\n            if(s[i]==\'X\')\n                ans++,i=i+3;  //for this X we are using 1 move and by doing that we can move 3 steps without any checks\n            else\n                i++;           \n        }\n        \n        return ans;\n    }\n};
[]