import scala.annotation.tailrec
import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer
import scala.io.StdIn._

object Main extends App {

  val Array(m, n, k) = readLine.trim.split(' ').map(_.toInt)
  val weight = Array.tabulate(n){_ ⇒ readLine.trim.toInt}
  val request = Array.tabulate(k){_ ⇒ readLine.trim.toInt - 1}
  val nodes = Array.fill(k + 1){ArrayBuffer[Edge]()}
  val prev = Array.fill(10001){k}
  for (i ← nodes.indices.tail) {
    nodes(i).append(Edge(i - 1, -10000, 0))
    nodes(i - 1).append(Edge(i, 10000, m))
    nodes(i).last.pair = nodes(i - 1).last
    nodes(i - 1).last.pair = nodes(i).last
  }
  var default = 0L
  for (i ← request.indices.reverse) {
    if (prev(request(i)) != k) {
      if (prev(request(i)) - 1 == i) {
        default += weight(request(i))
      } else {
        nodes(i).append(Edge(prev(request(i)) - 1, 10000 * (prev(request(i)) - 1 - i) - weight(request(i)), 1))
        nodes(prev(request(i)) - 1).append(Edge(i, weight(request(i)) - 10000 * (prev(request(i))  - 1 - i), 0))
        nodes(i).last.pair = nodes(prev(request(i)) - 1).last
        nodes(prev(request(i)) - 1).last.pair = nodes(i).last
      }
    }
    prev(request(i)) = i
  }
  println(pushFlow(nodes, m - 1) - 10000 * k * (m - 1) + request.map(weight).sum - default)
  def pushFlow[I <: Iterable[Edge]](nodes: Array[I], flow: Int): Long = {
    val potential = Array.fill(nodes.length){0L}
    val minCost = Array.fill(nodes.length){Long.MaxValue}
    val queue = mutable.PriorityQueue()(Ordering.by[(Int, Long), Long](_._2).reverse)
    val prev = nodes.map{_.head}
    var result = 0L
    for (_ ← 0 until flow) {
      minCost.indices.foreach(i ⇒ minCost(i) = Long.MaxValue)
      minCost(0) = 0L
      queue.enqueue((0, 0L))
      while(queue.nonEmpty) {
        val (current, currentCost) = queue.dequeue()
        if (current != nodes.length - 1 && minCost(current) == currentCost) {
          for (e@Edge(to, cost, flow) ← nodes(current) if flow > 0) {
            if (minCost(to) > potential(current) + cost - potential(to) + currentCost) {
              minCost(to) = potential(current) + cost - potential(to) + currentCost
              prev(to) = e
              queue.enqueue((to, minCost(to)))
            }
          }
        }
      }
      if (minCost.last != Long.MaxValue) {
        for (i ← nodes.indices if minCost(i) != Long.MaxValue) potential(i) += minCost(i)
        result += potential.last
        var last = nodes.length - 1
        while(last != 0){
          prev(last).flow -= 1
          prev(last).pair.flow += 1
          last = prev(last).pair.to
        }
      }
    }
    result
  }

}

case class Edge(to: Int, cost: Long, var flow: Int) {
  private var mPair: Option[Edge] = None
  def pair: Edge = mPair.get
  def pair_=(edge: Edge) = mPair = Some(edge)
}


