# coding: utf-8 N = int(input()) old_first_ken = 1 old_second_ken = 0 old_pa = 0 new_first_ken = 0 new_second_ken = 0 new_pa = 0 for i in range(1, N): new_first_ken = old_pa new_second_ken = old_first_ken new_pa = (old_first_ken + old_second_ken) % 1000000007 old_first_ken = new_first_ken old_second_ken = new_second_ken old_pa = new_pa print((old_first_ken + old_second_ken + old_pa) % 1000000007)