vladimir like prepare present wife anniversary he decide buy exactly n flowersVladimir go flower shop amazed m type flower sell unlimited supply flower type Vladimir want choose flower maximize happiness wife he know receive flower ith type happiness wife increase a_i receive consecutive flower type happiness increase b_i that choose flower x_i 0 flower type wife get a_i x_i 1 cdot b_i additional happiness flower type get particular typeplease help Vladimir choose exactly n flower maximize total happiness wife