I guess there s point remind Nvodsk winter are not exactly hot that increase popularity public transport dramatically the route bus 62 exactly n stop stop 1 go way stop n go the stop position straight line coordinate 0x1x2xn each day exactly m people use bus 62 for person know number stop get bus number stop get bus a ticket stop stop b ab cost xbxa ruble however conductor choose segment not to sell ticket we mean conductor choose C D С D sell ticket segment a C d b sell ticket the conductor passenger divide save money equally the conductor untaxed income interrupt inspection place bus drive segment route locate consecutive stop the inspector fine conductor c ruble passenger do not ticket route segmentyou know coordinate stop xi number stop ith passenger get ai bi aibi fine c pi probability inspection segment ith i1th stop the conductor ask help plan sell ticket maximize mathematical expectation profit