lavrenty baker go bun stuffings sell themLavrenty n gram dough m different stuffing type the stuffing type numerate 1 m Lavrenty know ai gram leave ith stuff it take exactly bi gram stuff ci gram dough cook bun ith stuff such bun sell di tugriksalso bun stuffings each bun require c0 gram dough sell d0 tugrik so Lavrenty cook number bun different stuffing run dough stuffing Lavrenty throw away excess material leave bakingfind maximum number tugriks Lavrenty earn