moves to 0 to keep track of the minimum moves required.i to 0 to iterate through the string.i is less than the length of the string:
a. If the character at index i is 'X':
i. Increment the moves counter by 1.
ii. Increment i by 3 to skip the next two characters affected by the move.
b. Else, increment i by 1 to check the next character.moves counter as the result.