Luke like eat there n pile food align straight line the ith pile contain a_i unit food Luke walk 1st pile nth pile want eat pile food walk when Luke reach ith pile eat pile v a_i leq x x fix integer v luke food affinityBefore Luke start walk set v integer also 1 leq leq n Luke change food affinity integer eat ith pilefind minimum number change need eat pile foodnote initial choice v consider change