Fastest Java Solution
```\nclass Solution {\n    public int minimumMoves(String s) \n    {\n        if(!s.contains("X"))\n            return 0;\n        else\n        {\n            
```\nclass Solution {\n    public int minimumMoves(String s) \n    {\n        if(!s.contains("X"))\n            return 0;\n        else\n        {\n            int count=0;\n            int n=s.length();\n            for(int i=0;i<n;i++)\n            {\n                if(s.charAt(i)==\'X\')\n                {\n                    count++;\n                    i+=2;\n                    if(i>=n)\n                        break;\n                }\n            }\n            return count;\n        }\n    }\n}
['Java']