8, ... My solution uses the Golden Ratio as a way to figure out whether we are in the A or B. The relationship between Fibonacci sequence and Gold Ratio is pretty well known. g = 1.6180339887498949 # golden ratio t = ( '14159265358979323846264338327950288419716939937510' + '58209749445923078164062862089986280348253421170679' , '82148086513282306647093844609550582231725359408128' + '48111745028410270193852110555964462294895493038196' )