n = int(raw_input()) k = 1 kk = 0 p = 0 c = 1 while c < n: t = p p = k + kk kk = k k = t c += 1 print (k + kk + p) % (10**9 + 7)