problem #65

continued fractions: more painful than you'd think