You can use the folowing fact. If you consider the matrix
(0 1)
A = (2 2)
You can use the fact that an = An-2 * (1, 3)[1] (here (1,3) is a vector) and [1] means second coordinate of the vector. Here you can use binary exponentiation for the matrix. Consider the cases for n<=2 separately.