def quarter_start_month(quarter):
    """month that starts quarter for Gregorian calendar: Jan, Apr, Jul, Oct"""
    if quarter not in range(1, 5):
        raise ValueError("invalid quarter")
    return {1: 1, 2: 4, 3: 7, 4: 10}[quarter]
    # return 3 * quarter - 2