Question

Write a function that returns the next number in a geometric sequence?

Login to Submit

Examples

Input: [2, 6, 18]
Output: 54

Input: [3, 9, 27, 81]
Output: 80