def aqi(concentration):
    """Convert PM 2.5 concentration to AQI."""
    if concentration <= 12.:
        return round(4.1667 * concentration)
    elif concentration <= 35.4:
        return round(2.1030 * (concentration - 12.1) + 51.)
    elif concentration <= 55.4:
        return round(2.4623 * (concentration - 35.5) + 101.)
    elif concentration <= 150.4:
        return round(0.5163 * (concentration - 55.5) + 151.)
    elif concentration <= 250.4:
        return round(0.9910 * (concentration - 150.5) + 201.)
    elif concentration <= 500.4:
        return round(0.7963 * (concentration - 250.5) + 301.)
    else:
        return 999.