
    Given the number of available delivery routes during peak hours, calculate the harmonic distribution factor that will determine how to optimally spread delivery vehicles across the transportation network. This distribution factor is computed as the sum of the reciprocals of all integers from 1 to one less than the total number of routes, helping balance vehicle allocation by naturally favoring shorter routes while maintaining consideration for longer alternatives.
    

    
def harmonic_sum(n):
    """
    Given the number of available delivery routes during peak hours, calculate the harmonic distribution factor that will determine how to optimally spread delivery vehicles across the transportation network. This distribution factor is computed as the sum of the reciprocals of all integers from 1 to one less than the total number of routes, helping balance vehicle allocation by naturally favoring shorter routes while maintaining consideration for longer alternatives.
    

    """
def harmonic_sum(n):
    """
    Given the number of available delivery routes during peak hours, calculate the harmonic distribution factor that will determine how to optimally spread delivery vehicles across the transportation network. This distribution factor is computed as the sum of the reciprocals of all integers from 1 to one less than the total number of routes, helping balance vehicle allocation by naturally favoring shorter routes while maintaining consideration for longer alternatives.
    

    """
    if n < 2:
        return 1
    else:
        return 1 / n + harmonic_sum(n - 1)