Deutsche Telekom interview question

Max total alternate sequence total