Find n-th element from Stern's Diatomic Series
Given an integer n. we have to find the nth term of Stern's Diatomic Series.Stern's diatomic series is the sequence which generates the following integer sequence 0, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 5, 3, 4, ....... It arises in the Calkin-Wilf tree. It is sometimes also known as the fusc functio