Use stdin for input, and print result to stdout.

Looks great! Here's a pull request that reads an int from stdin and then writes the result to stdout. I was using it to test, and thought it might make a good contrib back.