M=1000000007 def mul(a,b) 2.times.map{|i| 2.times.map{|j| 2.times.map{|k|a[i][k]*b[k][j]}.inject(:+)%M }} end def fib(n) mat=[[1,1],[1,0]] prod=[[1,0],[0,1]] while n>0 prod=mul(prod,mat) if n.odd? mat=mul(mat,mat) n/=2 end prod[1][0] end n=gets.to_i puts (fib(n)*fib(n+1))%M