package main

import (
	"fmt"
)

func main() {
	var n, m int
	fmt.Scanf("%d, %d", &n, &m)

	ws := make([]int, m)
	sum := 0
	for i := 0; i < m; i++ {
		fmt.Scan(&ws[i])
		sum += ws[i]
	}

	flg := false
	cnt := 0
	for i := 1; i <= n; i++ {
		if flg {
			flg = false
			continue
		}
		for _, w := range ws {
			if w == i {
				flg = true
				break
			}
		}
		if flg {
			cnt += 2
		} else {
			cnt++
		}
	}

	fmt.Print(cnt % 1000000007)

}
