Amazon Interview Question

Given a string "abaca" minimum number of operations to make the string empty. example: operation 1: remove b -> aaca operation 2: remove c -> aaa operation 3: since all the a's are together remove all a's at once