Let n≥1 be an integer. We have two sequences, each of n positive real numbers a1,a2,…,an and b1,b2,…,bn such that a1+a2+…+an=1 and b1+b2+…+bn=1. Find the smallest possible value that the sum can take a1+b1a12+a2+b2a22+…+an+bnan2.