AppleScript + SE Answer
Actually picked this up by accident while editing an answer in this question. Go figure.
Use this by running the code, typing in your number that you want, swiping over to the SE post and clicking in the text field. This exploits the fact that quotes stack.
tell application "System Events"
set layers to (display dialog "" default answer "")'s text returned as number
delay 5
repeat layers times
keystroke ">"
end repeat
end tell
Output (input 50):