Java || Runtime 100% || Memory 74%
Complexity
Time complexity: O(n)

Space complexity: O(1)
Code
# Complexity
- Time complexity: $$O(n)$$ 
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: $$O(1)$$ 
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public int minimumMoves(String s) {
        int count = 0;
        int i = 0 ;
        int n = s.length();
        while(i < n){
            if(s.charAt(i) == 'X'){
                count++;
                i+=3;
                continue;
            }
            i++;
        }
        return count;
    }
}
```
['Java']