FERMAT 2017 Problem 7

If x=1 is a solution of the equation x^2+ax+1=0, then the value of a is

Answer Choices
A. 3
B. -1
C. 1
D. 2
E. -2