How can I determine the input size of an algorithm? Could you explain to me the input size of the algorithm with these cases? I can't understand the cases with multiple input parameters. Thanks.

algorithm_1( a[1,...,n], b[1,...,n] )
    for i ← 1 to legth[a] step ​1 do
        for j ← 1 to legth[b] step ​1 do
            x++
    return 0


-

algorithm_2( a[1,...,n], b[1,...,n] )
    return 1


-

algorithm_3( a[1,...,n], n )
    for i ← 0 to n step ​1 do
        sum += a[i]
    return sum


-

algorithm_4( m, n )
    for i ← 0 to n step ​1 do
        sum += m*2
    return sum
for the first code segment, input size is 2n. a has n elements, so does b.
for the second code segment, input size is 2n. a has n elements, so does b.
for the third segment, input size is n+1. a has n elements, and there is another value n.
for the fourth code segment, input size is 2.