public static void main(String[] args) {
		int counter = 0;
		int start = 22;
		long sum = 0L;

		while (counter < 11) {
			int currentLeft = start;
			int currentRight = start;

			while (isPrime(currentLeft) && currentLeft > 0) {
				currentLeft = leftShift(currentLeft);
			}

			while (isPrime(currentRight) && currentRight > 0) {
				currentRight = rightShift(currentRight);
			}

			if (currentLeft == 0 && currentRight == 0) {
				sum += start;
				++counter;
			}

			++start;
		}
		System.out.println(sum);
	}