Piysuh and magical string problem

getting wrong output
How to calculate the max strength he can gather?

Plz send your code by saving on ide.

Getting wrong strength