import random


def getPrime(offset):
	"""
	Finds the first prime number higher than a given offset.
	"""
	def isPrime(n):
		"""
		Checks if the given number (n) is a prime number.
		"""
		if n == 2 or n == 3: return True
		if n < 2 or n % 2 == 0: return False
		if n < 9: return True
		if n % 3 == 0: return False
		r = int(n**0.5)
		f = 5
		while f <= r:
			if n % f == 0: return False
			if n % (f+2) == 0: return False
			f += 6
		return True

	start = random.randrange(100)
	# print "start", start
	offset += start
	if offset % 2 == 0:
		offset += 1
	while True:
		if isPrime(offset):
			return offset
		offset += 2