Simple Solution
Intuition\nJust think about prev, curr and next(for this question we can ignore next) element of the string\n\n# Approach\nCheck both conditions to make string 
# Intuition\nJust think about prev, curr and next(for this question we can ignore next) element of the string\n\n# Approach\nCheck both conditions to make string beautiful, on prev and curr character. We don\'t have to worry about modifying the character as we only have to return the count. if condition does not match we hypothetically need to modify current character, and we have 22 possible character to choose from, leaving string[i-1] and string[i+1] and there sequestial character.\nso just increase the index from i+1 to i+2 as we have taken care of both i-1, i, i+1.\n\n\n# Code\n```\n/**\n * @param {string} word\n * @return {number}\n */\nvar removeAlmostEqualCharacters = function(word) {\n    let count=0;\n    const n=word.length;\n    for(let i=1;i<n;i++) {\n        const isNotBeautiful1 = word[i-1]===word[i];\n        const isNotBeautiful2 = Math.abs(word[i-1].charCodeAt(0)-word[i].charCodeAt(0))<=1;\n        if(isNotBeautiful1 || isNotBeautiful2) {\n            count++;\n            i++;\n        }\n    }\n    return count;\n};\n```
['JavaScript']