Accommodating the sudden influx of immigrants has been costly, but they can contribute to host economies