
    Design a function for an adaptive learning system that calculates the total number of shared learning checkpoints between a student's current skill level and their target achievement level, where checkpoints are represented by common divisors of both levels. The function should help identify overlapping milestones in the learning path to better personalize the student's educational journey.
    

    
def sum(a, b):
    """
    Design a function for an adaptive learning system that calculates the total number of shared learning checkpoints between a student's current skill level and their target achievement level, where checkpoints are represented by common divisors of both levels. The function should help identify overlapping milestones in the learning path to better personalize the student's educational journey.
    

    """
def sum(a, b):
    """
    Design a function for an adaptive learning system that calculates the total number of shared learning checkpoints between a student's current skill level and their target achievement level, where checkpoints are represented by common divisors of both levels. The function should help identify overlapping milestones in the learning path to better personalize the student's educational journey.
    

    """
    sum = 0
    for i in range(1, min(a, b)):
        if a % i == 0 and b % i == 0:
            sum += i
    return sum