created function to find nth value in fibonacci series