public int days(int[] arrivals, int numPerDay) {
		int day = 0;
		for (int i = 0; i < arrivals.length - 1; i++) {
			if (arrivals[i] > 0) {
				day++;
				arrivals[i + 1] +=Math.max(arrivals[i] - numPerDay,0);
			}
		}
		day += arrivals[arrivals.length - 1] / numPerDay;
		if (arrivals[arrivals.length - 1] % numPerDay > 0) {
			day++;
		}
		return day;
	}