Check if the character is on left side of window find the cost of modification for character add value to count calculate nearest distance of modification
if ( j >= a and j >= b ) : NEW_LINE INDENT count = count + ( min ( j - b , 25 - j + a + 1 ) ) * cnt [ j ] NEW_LINE DEDENT