0
Lua, 324 Bytes
When I see other submission, I feel like there's something wrong with my code... But then, I remember that's Lua, and there's isn't all these fancy functionnalities :'(
It was a lot of fun, took me some time actually.
function f(l)c=2 y,z=table.remove,os.exit while(l[1]<2)do y(l...