Watch the Numberphile video to write a function that utilizes the formula Katie Steckles uses to solve the Mental Logs.

3847 is one stick with the numbers 3, 8, 4, and 7 below each other. (Picture, last log).n sticks.mentalLogs([7593, 5687, 4628, 9485]) ➞ 29826
mentalLogs([2957, 8357, 3798, 2739]) ➞ 25591
mentalLogs([6428]) ➞ 20
The formula is very easy; you'll be able to solve the trick just by looking at the array input.