#include main() { int L, N; int width[10000]; scanf("%d", &L); scanf("%d", &N); for (int i=0; i width[i+1]) { int tmp = width[i]; width[i] = width[i+1]; width[i+1] = width[i]; flag = 1; } } if (flag == 0) break; } int total = 0; for (int i = 0; i L) { printf("%d\n", i); break; } } }