parse arg n
If n < 1 Then Do
    n = 1
End

last = n - 1

Y.0 = 0
Do i = 0 To last
    X.i = i + 1
    Y.i = 0
End

Do k = 0 To 999
    Do i = last To 0 By -1
        Y.i = Y.i + X.i
    End
End

say Y.0" "Y.last