from typing import Counter


def add_dict(dicts):
    """Add dictionaries.

    This will add the two dictionaries

    `A = {'a':1, 'b':2, 'c':3}`
    `B = {'b':3, 'c':4, 'd':5}`

    into

    `A + B {'a':1, 'b':5, 'c':7, 'd':5}`

    but works for an arbitrary number of dictionaries."""
    # start with the first dict
    res = Counter(dicts[0])
    # successively add all other dicts
    for d in dicts[1:]: res.update(Counter(d))
    return res