def will_get(name, payments):
    """Calculate how much money will a person 'name' get from payments."""

    r = 0
    r += sum(p for who, whom, p in payments if whom == name)
    r -= sum(p for who, whom, p in payments if who == name)
    return r