private static long largestPrimeFactor(long number) {
		// If number is less than 2 then simple return -1
		if (number < 2) {
			return -1;
		}

		// If number is 2 or 3 then simply return the number
		if (number == 2 || number == 3) {
			return number;
		}

		// Start factoring from smallest prime number which is 2
		long factor = 2;
		while (true) {
			counter++;
			// When remove all the factors from the number then number is
			// reduced to only 1. It means we have found our factor;
			if (number == 1) {
				System.out.println(counter);
				return factor;
			}

			// If the number can not be divided by factor then we have to move
			// to the next number.
			if ((number % factor) != 0) {
				// increment the factor
				factor++;
				// Small optimization: if number is even then we increment
				// factor again as we already have removed all 2s from the
				// number.
				if ((factor & 1) == 0) {
					factor++;
				}
			} else {
				// Remove the factor from the number
				number = (number / factor);
			}
		}
		

	}