def add_dict(left, right):
    """Merge two dictionaries by adding common items.


    Parameters
    ----------
    left: dict
        Left dictionary.

    right
        Right dictionary


    Returns
    -------
    dict
        Resulting dictionary
    """
    return {k: left.get(k, 0) + right.get(k, 0) for k in left.keys() | right.keys()}