import math


def ComputeBDistortion(cell1, cell2):
    """Compute the distortion required to get from cell1 to cell2."""

    d = 0.0

    for j in range(6):
        d += math.fabs(cell2[j] - cell1[j])

    return d