Minimum excluded number
Pyth, 6 bytes

h-U21Q


Example run

$ pyth -c h-U21Q &lt;&lt;&lt; '[5, 4, 1, 5, 4, 8, 2, 1, 5, 4, 0, 7, 7]'
3


How it works

  U21   range(21)
     Q  eval(input())
 -U21Q  setwisedifference(range(21), eval(input))          # Pyth function. Preserves order.
h-U21Q  setwisedifference(range(21), eval(input))[0]