Google kick start round E

How to solve problem D any help would be appreciated