Collapse parse_open and parse_close into one function
Solve Project Euler problem #1 in Rust