uva 156

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&cat
egory=98&page=show_problem&problem=92