added code for Uva:484