simple cpp solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\no(n)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\no(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int minimumMoves(string s) {\n        int count=0;\n        if(s.find(\'X\')==string::npos)return 0;\n        int k=0;\n        for(int i=0;i<s.length()-3;)\n        {\n            if(s[i]==\'O\')\n            {\n              i++;\n              continue;  \n            }\n            string a=s.substr(i,3);\n            if(a.find(\'X\'!=string::npos))\n            {\n                count++;\n            }\n            k=i+3;\n            i+=3;\n        }\n        string b=s.substr(k,s.length()-k);\n        if(b.find(\'X\')!=string::npos)\n            {\n                count++;\n            }\n            return count;\n    }\n};\n```
['C++']