added code for Uva: 10003 568