It would be more difficult, but I don't think it has to be "a lot more difficult". The code could make a lookup in the actuarial life tables for each country to get the expected remaining years of life for a person of that age, and then just aggregate these, no?