Inverse problem for adaptive SIR model: Application to COVID-19 in Latin America