A Hellmann is megoldás, de ha arra nem akarsz beruházni, itt van egy megoldás Cauchy jóvoltából:
Link