since Boboniu finish build Jianghu Kungfu mountain day Boboniu design map n mountain he use n1 road connect n mountain every pair mountain connect roadsFor ith mountain Boboniu estimate tiredness Kungfu t_i he estimate height mountain h_iA path sequence mountain M 1 le M exist road m_i m_i1 Boboniu regard path challenge 1le iM h_m_ile h_m_i1boboniu want divide n1 road challenge note road appear exactly challenge mountain appear challenge Boboniu want minimize total tiredness challenge the tiredness challenge M sum tiredness mountain ie sum_i1Mt_M_i he ask find minimum total tiredness as reward work you ll guardian Jianghu