## Shell, 52 read a read b (seq 1 $a;seq 1 $b)|wc|awk '{print$1}' This is basically the [same answer][1] I gave for another problem. [1]: http://stackoverflow.com/a/4765078/149391