String first half and Sum of digits problem