def totalE(x, l):
    """
    Parmeters:
        x    The spin configuration on the Buckyball lattice.
        l    The Buckyball lattice edge labels.
    Returns:
        E    The total energy of the given spin configuration on the Buckyball lattice.
    """
    E = 0
    for i in range(90):
        E+=x[int(l[i,0])]*x[int(l[i,1])]
    return E