#Befunge 98, 22 &:00pv>0gk,@ 0::-1<^j` Kind of sad that this is so long. &:00p ; gets numerical input, stores a copy at cell (0,0) ; v ; IP goes down ; < ; IP goes left, so I execute 1-::0`j^ ; ::-1 ; (1-::) subtract one from our number and duplicate it twice ; 0 ` ; (0`) compare the number with 0, push 1 if greater else 0 ; <^j ; if the result was 0, go up, otherwise continue going left ; >0gk, ; get the value at cell (0,0), print that many numbers from stack ; @ ; terminate program ;