Merge Sort, run time error

def mergeSort(arr):
if len(arr) > 1:
mid = len(arr)/2
L = arr[:mid]
R = arr[mid:]

    mergeSort(L)
    mergeSort(R)

    i = j = k = 0

    while i < len(L) and j < len(R):
        if L[i] < R[j]:
            arr[k] = L[i]
            i+=1
        else:
            arr[k] = R[j]
            j+=1
        k+=1

        while i < len(L):
            arr[k] = L[i]
            i+=1
            k+=1

        while j < len(R): 
            arr[k] = R[j] 
            j+=1
            k+=1

n = int(input())
arr = [int(no) for no in input().split()]
mergeSort(arr)
print(arr)

Doubt is not resolved, clicked on resolved by mistake

also, in line " arr = [int(no) for no in input().split()] " where do i use my integar " n "