Interpolate between lines

Dear All,

I need your help, I have file like this :

input.txt
1000
1002
1006
1010
.
.
.

desired output:

1000
1001
1002
1004
1006
1008
1010
.
.
.

I need to interpolate betwen one line with next line,
algoritm is

bold_line= (line_upper + line_lower)/2

Thanks for advance,

Attila

How about:

awk 'p { print ($1+p)/2} p=$1' input.txt

thank Chubler_XL, it solved.