max sum upto k