Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given a string s consisting of n characters which are either 'X' or 'O'.
A move is defined as selecting three consecutive characters of s and converting them to 'O'. Note that if a move is applied to the character 'O', it will stay the same.
Return the minimum number of moves required so that all the characters of s are converted to 'O'.
 
Please complete the following python code precisely:
```python
class Solution:
    def minimumMoves(self, s: str) -> int:
```