
    Given two integers representing the number of available delivery routes and delivery time slots respectively, write a function that calculates the total number of common scheduling intervals that can evenly divide both route segments and time slots to optimize delivery planning. This optimization will help identify the most efficient way to break down routes and time windows into synchronized segments for coordinated fleet management.
    

    
def sum(a, b):
    """
    Given two integers representing the number of available delivery routes and delivery time slots respectively, write a function that calculates the total number of common scheduling intervals that can evenly divide both route segments and time slots to optimize delivery planning. This optimization will help identify the most efficient way to break down routes and time windows into synchronized segments for coordinated fleet management.
    

    """
def sum(a, b):
    """
    Given two integers representing the number of available delivery routes and delivery time slots respectively, write a function that calculates the total number of common scheduling intervals that can evenly divide both route segments and time slots to optimize delivery planning. This optimization will help identify the most efficient way to break down routes and time windows into synchronized segments for coordinated fleet management.
    

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