# -*- coding: utf-8 -*-
def seach(ary, ki)
  for i in 0..ary.length-1
    if ary[i] <= ki && ki <= ary[i+1]
      if ki - ary[i] < ary[i+1] - ki
        return ki - ary[i]
      else
        return ary[i+1] - ki
      end
    end
  end
end   

d = gets.chomp.to_i #??¨???
n = gets.chomp.to_i #????????°
m = gets.chomp.to_i #??¨?????°

dAry = [] #????????????
dAry[0] = 0
for i in 1..n-1
  dAry[i] = gets.chomp.to_i
end
dAry[dAry.length] = d
dAry = dAry.sort

kAry = [] #?????????
for i in 0..m-1
  kAry[i] = gets.chomp.to_i
end

sum = 0
kAry.each do |i|
  sum += seach(dAry, i)
end

puts sum