public static void main(String[] args) {
		// This counts how many people we had to check
		int counter = 0;
		// This is the index of the array we update
		int index;
		// array to contain ALL THE BIRTHDAYS
		int[] daysOfYear = new int[365];
		// Used to test if its possible for three birthdays to be consecutive up
		// to index.
		boolean consecutiveBirthdays = false;

		do {
			index = (int) (Math.random() * 365);
			daysOfYear[index]++;
			counter++;
		} while (daysOfYear[index] < 3);

		// Three consecutive birthdays???
		// FIX!!!!
		do {
			index = (int) (Math.random() * 365);
			daysOfYear[index]++;
			counter++;

			if (index >= 2) {
				if (daysOfYear[index] >= 1 && daysOfYear[index - 1] >= 1
						&& daysOfYear[index - 2] >= 1) {
					consecutiveBirthdays = true;
				}
			}
		} while (!consecutiveBirthdays);

		// The final Output.
		System.out.println("It took " + counter
				+ " times to find 3 people with the same birthday");
	}