依题意可知,anan+1an+2=an+an+1+an+2,an-1anan+1=an-1+an+an+1,
两式相减得anan+1(an+2-an-1)=an+2-an-1,
∵an•an+1≠1,
∴an+2-an-1=0,即an+3=an,
∴数列{an}是以3为周期的数列,
∵a1a2a3=a1+a2+a3,∴a3=3
∴S2012=670×(1+2+3)+1+2=4023
故答案为:4023.
依题意可知,anan+1an+2=an+an+1+an+2,an-1anan+1=an-1+an+an+1,
两式相减得anan+1(an+2-an-1)=an+2-an-1,
∵an•an+1≠1,
∴an+2-an-1=0,即an+3=an,
∴数列{an}是以3为周期的数列,
∵a1a2a3=a1+a2+a3,∴a3=3
∴S2012=670×(1+2+3)+1+2=4023
故答案为:4023.