n = gets.to_i na = n / 2 nb = n - na res = (((na + 1) % 1000007) * ((nb + 1) % 1000007) + 1000006) % 1000007 puts res