Uva 471 - Magic numbers