If a satisfies the equation a2017−2a+1=0 and S=1+a+a2+.....+a2016, then possible value(s) of S is/ are