import mpmath


def mean(a, b):
    """
    Mean of the beta distribution.
    """
    if a <= 0 or b <= 0:
        raise ValueError('The shape parameters a and b must be greater '
                         'than 0.')
    a = mpmath.mpf(a)
    b = mpmath.mpf(b)
    return a/(a + b)