Original sum of the longest sequence solved