Problem 13 of eular project