def pollution_grade(aqi: int) -> int:
    """Translate aqi levels to pollution grade."""
    if         aqi <=  50: return 0
    elif  50 < aqi <= 100: return 1
    elif 100 < aqi <= 150: return 2
    elif 150 < aqi <= 200: return 3
    elif 200 < aqi <= 300: return 4
    else:                  return 5