def hhmmss_to_sec(hhmmss):
    """Parses a HH:MM:SS-string and returns the corresponding number of seconds after midnight.

    Args:
        hhmmss (str): HH:MM:SS-string

    Returns:
        int: number of seconds after midnight.
    """
    h, m, s = hhmmss.split(':')
    return int(h) * 3600 + int(m) * 60 + int(s)