Ivan is collecting coins. There are only $N$ different collectible coins, Ivan has $K$ of them. He will be celebrating his birthday soon, so all his $M$ freinds decided to gift him coins. They all agreed to three terms:  Everyone must gift as many coins as others. All coins given to Ivan must be different. Not less than $L$ coins from gifts altogether, must be new in Ivan's collection.

But his friends don't know which coins have Ivan already got in his collection. They don't want to spend money so they want to buy minimum quantity of coins, that satisfy all terms, irrespective of the Ivan's collection. Help them to find this minimum number of coins or define it's not possible to meet all the terms.


-----Input-----

The only line of input contains 4 integers $N$, $M$, $K$, $L$ ($1 \le K \le N \le 10^{18}$; $1 \le M, \,\, L \le 10^{18}$) — quantity of different coins, number of Ivan's friends, size of Ivan's collection and quantity of coins, that must be new in Ivan's collection.


-----Output-----

Print one number — minimal number of coins one friend can gift to satisfy all the conditions. If it is impossible to satisfy all three conditions print "-1" (without quotes).


-----Examples-----
Input
20 15 2 3

Output
1
Input
10 11 2 4

Output
-1


-----Note-----

In the first test, one coin from each friend is enough, as he will be presented with 15 different coins and 13 of them will definitely be new.

In the second test, Ivan has 11 friends, but there are only 10 different coins. So all friends can't present him different coins.

Difficulty: MEDIUM

Solutions:
(n, m, k, l) = map(int, input().split())
a = (l + k) // m
if (l + k) % m:
	a += 1
if a * m > n:
	print(-1)
else:
	print(a)


def main():
	(n, m, k, l) = list(map(int, input().split()))
	d = (l + k + m - 1) // m
	print(d if d * m <= n and k + l <= n else -1)
main()


a = input().split()
n = int(a[0])
m = int(a[1])
k = int(a[2])
l = int(a[3])
if k + l > n:
	print(-1)
else:
	ans = (k + l) // m
	if (k + l) % m > 0:
		ans += 1
	if ans * m > n:
		print(-1)
	else:
		print(ans)


(n, m, k, l) = map(int, input().split())
x1 = (l + k - 1) // m + 1
if x1 * m <= n and k + l <= n:
	print(x1)
else:
	print(-1)


import math
import heapq, bisect
import sys
from collections import deque, defaultdict
from fractions import Fraction
import sys
mod = 10 ** 9 + 7
mod1 = 998244353
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

class TreeNode:

	def __init__(self, k, v):
		self.key = k
		self.value = v
		self.left = None
		self.right = None
		self.parent = None
		self.height = 1
		self.num_left = 1
		self.num_total = 1

class AvlTree:

	def __init__(self):
		self._tree = None

	def add(self, k, v):
		if not self._tree:
			self._tree = TreeNode(k, v)
			return
		node = self._add(k, v)
		if node:
			self._rebalance(node)

	def _add(self, k, v):
		node = self._tree
		while node:
			if k < node.key:
				if node.left:
					node = node.left
				else:
					node.left = TreeNode(k, v)
					node.left.parent = node
					return node.left
			elif node.key < k:
				if node.right:
					node = node.right
				else:
					node.right = TreeNode(k, v)
					node.right.parent = node
					return node.right
			else:
				node.value = v
				return

	@staticmethod
	def get_height(x):
		return x.height if x else 0

	@staticmethod
	def get_num_total(x):
		return x.num_total if x else 0

	def _rebalance(self, node):
		n = node
		while n:
			lh = self.get_height(n.left)
			rh = self.get_height(n.right)
			n.height = max(lh, rh) + 1
			balance_factor = lh - rh
			n.num_total = 1 + self.get_num_total(n.left) + self.get_num_total(n.right)
			n.num_left = 1 + self.get_num_total(n.left)
			if balance_factor > 1:
				if self.get_height(n.left.left) < self.get_height(n.left.right):
					self._rotate_left(n.left)
				self._rotate_right(n)
			elif balance_factor < -1:
				if self.get_height(n.right.right) < self.get_height(n.right.left):
					self._rotate_right(n.right)
				self._rotate_left(n)
			else:
				n = n.parent

	def _remove_one(self, node):
		replacement = node.left or node.right
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = replacement
			else:
				node.parent.right = replacement
			replacement.parent = node.parent
			node.parent = None
		else:
			self._tree = replacement
			replacement.parent = None
		node.left = None
		node.right = None
		node.parent = None
		self._rebalance(replacement)

	def _remove_leaf(self, node):
		if node.parent:
			if AvlTree._is_left(node):
				node.parent.left = None
			else:
				node.parent.right = None
			self._rebalance(node.parent)
		else:
			self._tree = None
		node.parent = None
		node.left = None
		node.right = None

	def remove(self, k):
		node = self._get_node(k)
		if not node:
			return
		if AvlTree._is_leaf(node):
			self._remove_leaf(node)
			return
		if node.left and node.right:
			nxt = AvlTree._get_next(node)
			node.key = nxt.key
			node.value = nxt.value
			if self._is_leaf(nxt):
				self._remove_leaf(nxt)
			else:
				self._remove_one(nxt)
			self._rebalance(node)
		else:
			self._remove_one(node)

	def get(self, k):
		node = self._get_node(k)
		return node.value if node else -1

	def _get_node(self, k):
		if not self._tree:
			return None
		node = self._tree
		while node:
			if k < node.key:
				node = node.left
			elif node.key < k:
				node = node.right
			else:
				return node
		return None

	def get_at(self, pos):
		x = pos + 1
		node = self._tree
		while node:
			if x < node.num_left:
				node = node.left
			elif node.num_left < x:
				x -= node.num_left
				node = node.right
			else:
				return (node.key, node.value)
		raise IndexError('Out of ranges')

	@staticmethod
	def _is_left(node):
		return node.parent.left and node.parent.left == node

	@staticmethod
	def _is_leaf(node):
		return node.left is None and node.right is None

	def _rotate_right(self, node):
		if not node.parent:
			self._tree = node.left
			node.left.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.left
			node.left.parent = node.parent
		else:
			node.parent.right = node.left
			node.left.parent = node.parent
		bk = node.left.right
		node.left.right = node
		node.parent = node.left
		node.left = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	def _rotate_left(self, node):
		if not node.parent:
			self._tree = node.right
			node.right.parent = None
		elif AvlTree._is_left(node):
			node.parent.left = node.right
			node.right.parent = node.parent
		else:
			node.parent.right = node.right
			node.right.parent = node.parent
		bk = node.right.left
		node.right.left = node
		node.parent = node.right
		node.right = bk
		if bk:
			bk.parent = node
		node.height = max(self.get_height(node.left), self.get_height(node.right)) + 1
		node.num_total = 1 + self.get_num_total(node.left) + self.get_num_total(node.right)
		node.num_left = 1 + self.get_num_total(node.left)

	@staticmethod
	def _get_next(node):
		if not node.right:
			return node.parent
		n = node.right
		while n.left:
			n = n.left
		return n

class SegmentTree1:

	def __init__(self, data, default=0, func=lambda a, b: max(a, b)):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class SegmentTree:

	def __init__(self, data, default=0, func=lambda a, b: a + b):
		self._default = default
		self._func = func
		self._len = len(data)
		self._size = _size = 1 << (self._len - 1).bit_length()
		self.data = [default] * (2 * _size)
		self.data[_size:_size + self._len] = data
		for i in reversed(range(_size)):
			self.data[i] = func(self.data[i + i], self.data[i + i + 1])

	def __delitem__(self, idx):
		self[idx] = self._default

	def __getitem__(self, idx):
		return self.data[idx + self._size]

	def __setitem__(self, idx, value):
		idx += self._size
		self.data[idx] = value
		idx >>= 1
		while idx:
			self.data[idx] = self._func(self.data[2 * idx], self.data[2 * idx + 1])
			idx >>= 1

	def __len__(self):
		return self._len

	def query(self, start, stop):
		if start == stop:
			return self.__getitem__(start)
		stop += 1
		start += self._size
		stop += self._size
		res = self._default
		while start < stop:
			if start & 1:
				res = self._func(res, self.data[start])
				start += 1
			if stop & 1:
				stop -= 1
				res = self._func(res, self.data[stop])
			start >>= 1
			stop >>= 1
		return res

	def __repr__(self):
		return 'SegmentTree({0})'.format(self.data)

class Factorial:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorials = [1, 1]
		self.invModulos = [0, 1]
		self.invFactorial_ = [1, 1]

	def calc(self, n):
		if n <= -1:
			print('Invalid argument to calculate n!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.factorials):
			return self.factorials[n]
		nextArr = [0] * (n + 1 - len(self.factorials))
		initialI = len(self.factorials)
		prev = self.factorials[-1]
		m = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * i % m
		self.factorials += nextArr
		return self.factorials[n]

	def inv(self, n):
		if n <= -1:
			print('Invalid argument to calculate n^(-1)')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		p = self.MOD
		pi = n % p
		if pi < len(self.invModulos):
			return self.invModulos[pi]
		nextArr = [0] * (n + 1 - len(self.invModulos))
		initialI = len(self.invModulos)
		for i in range(initialI, min(p, n + 1)):
			next = -self.invModulos[p % i] * (p // i) % p
			self.invModulos.append(next)
		return self.invModulos[pi]

	def invFactorial(self, n):
		if n <= -1:
			print('Invalid argument to calculate (n^(-1))!')
			print('n must be non-negative value. But the argument was ' + str(n))
			exit()
		if n < len(self.invFactorial_):
			return self.invFactorial_[n]
		self.inv(n)
		nextArr = [0] * (n + 1 - len(self.invFactorial_))
		initialI = len(self.invFactorial_)
		prev = self.invFactorial_[-1]
		p = self.MOD
		for i in range(initialI, n + 1):
			prev = nextArr[i - initialI] = prev * self.invModulos[i % p] % p
		self.invFactorial_ += nextArr
		return self.invFactorial_[n]

class Combination:

	def __init__(self, MOD):
		self.MOD = MOD
		self.factorial = Factorial(MOD)

	def ncr(self, n, k):
		if k < 0 or n < k:
			return 0
		k = min(k, n - k)
		f = self.factorial
		return f.calc(n) * f.invFactorial(max(n - k, k)) * f.invFactorial(min(k, n - k)) % self.MOD

def powm(a, n, m):
	if a == 1 or n == 0:
		return 1
	if n % 2 == 0:
		s = powm(a, n // 2, m)
		return s * s % m
	else:
		return a * powm(a, n - 1, m) % m

def sort_list(list1, list2):
	zipped_pairs = zip(list2, list1)
	z = [x for (_, x) in sorted(zipped_pairs)]
	return z

def product(l):
	por = 1
	for i in range(len(l)):
		por *= l[i]
	return por

def binarySearchCount(arr, n, key):
	left = 0
	right = n - 1
	count = 0
	while left <= right:
		mid = int((right + left) / 2)
		if arr[mid] < key:
			count = mid + 1
			left = mid + 1
		else:
			right = mid - 1
	return count

def countdig(n):
	c = 0
	while n > 0:
		n //= 10
		c += 1
	return c

def binary(x, length):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y

def countGreater(arr, n, k):
	l = 0
	r = n - 1
	leftGreater = n
	while l <= r:
		m = int(l + (r - l) / 2)
		if arr[m] >= k:
			leftGreater = m
			r = m - 1
		else:
			l = m + 1
	return n - leftGreater
(a, b, c, d) = map(int, input().split())
if b > a or c + d > a:
	print(-1)
	sys.exit()
else:
	e = math.ceil(Fraction(d + c, b))
	if e * b > a:
		print(-1)
	else:
		print(e)


(a, b, c, d) = map(int, input().split())
f = c + d
if f % b == 0:
	t = f // b
else:
	t = f // b + 1
if t * b > a:
	print(-1)
else:
	print(t)


(n, m, k, l) = list(map(int, input().split()))
if k + l > n:
	print('-1')
else:
	x = (k + l) // m
	if (k + l) % m > 0:
		x += 1
	if x * m > n:
		print('-1')
	else:
		print(x)


(n, m, k, l) = map(int, input().split())
ans = -1
lo = 0
r = 10 ** 18
while lo <= r:
	mid = (lo + r) // 2
	if m * mid >= l + k and m * mid <= n:
		ans = mid
		r = mid - 1
	elif m * mid > n:
		r = mid - 1
	else:
		lo = mid + 1
print(ans)


import math
(n, m, k, l) = [int(x) for x in input().split()]
if n - k < l:
	print(-1)
elif m > n:
	print(-1)
elif k + l < m:
	print(1)
elif (k + l) % m == 0:
	print((k + l) // m)
elif ((k + l) // m + 1) * m <= n:
	print((k + l) // m + 1)
else:
	print(-1)


import math
(n, m, k, l) = map(int, input().split())
x = -(k + l) // m
if k + l > n:
	print(-1)
elif m * -x > n:
	print(-1)
else:
	print(-x)


(n, m, k, l) = input().split()
n = int(n)
m = int(m)
k = int(k)
l = int(l)
result = -1
for i in range((l + k) // m, (n + k) // m + 1):
	if l <= m * i - k <= n and m * i <= n:
		result = i
		break
	elif m * i > n:
		break
	else:
		x = (n + l + 2 * k) // (2 * m) - 1
		if not (l <= m * x - k <= n and m * x <= n):
			i = x
print(result)


from typing import Dict, List
(n, m, k, l) = (int(val) for val in input().split())
res = (k + l) // m
if (k + l) % m > 0:
	res += 1
if res * m > n:
	res = -1
print(res)


s = input().split()
n = int(s[0])
m = int(s[1])
k = int(s[2])
l = int(s[3])
import math
f = l + k
if f > n:
	print(-1)
else:
	if f % m == 0:
		t = f
	else:
		t = f - f % m + m
	if t > n:
		print(-1)
	else:
		print(t // m)


from math import ceil
(n, m, k, l) = map(int, input().split())
if l == 0:
	print(0)
elif m > n:
	print(-1)
elif l > n - k:
	print(-1)
elif m > l + k:
	print(1)
else:
	d = (k + l) // m
	if (k + l) % m != 0:
		d += 1
	if d * m > n:
		print(-1)
	else:
		print(d)


(n, m, k, l) = map(int, input().split())
if n - k < l:
	print(-1)
	exit(0)
a = k + l
b = a // m
if a % m:
	b += 1
if b * m > n:
	print(-1)
	exit(0)
print(b)


from math import ceil

def mlt():
	return map(int, input().split())
(n, m, k, l) = mlt()
x = (l + k + m - 1) // m
if m * x <= n:
	print(x)
else:
	print(-1)


(n, m, k, l) = map(int, input().split())
if m > n:
	print(-1)
	exit()
x = (k + l + m - 1) // m
if m * x > n:
	print(-1)
else:
	print(x)


(n, m, k, l) = map(int, input().split())
need = k + l
cnt = need // m
if cnt * m < need:
	cnt += 1
add = cnt * m
if add > n:
	print(-1)
else:
	print(cnt)


(tot_coins, friends, has, min_new) = [int(x) for x in input().split(' ')]
if tot_coins - has < min_new:
	print(-1)
	exit(0)
to_dist = has + min_new
per_friend = to_dist // friends
if to_dist % friends != 0:
	per_friend += 1
if friends * per_friend > tot_coins:
	print(-1)
	exit(0)
print(per_friend)


def inint():
	return int(input())

def inlist():
	return list(map(int, input().split()))

def main():
	from math import ceil as cl
	(n, m, k, l) = inlist()
	x = (k + l - 1) // m + 1
	if x * m > n:
		print(-1)
	else:
		print(x)
main()


(n, m, k, l) = tuple(map(int, input().split()))
r = int((l + k) / m)
if r * m < l + k:
	r += 1
print(-1) if r * m > n else print(r)


import math

def main():
	(n, m, k, l) = map(int, input().strip().split())
	t = int(k + l + m - 1) // m
	if k + l > n:
		print(-1)
		return
	if m * t > n:
		print(-1)
		return
	print(t)

def __starting_point():
	main()
__starting_point()


import sys
(n, m, k, l) = map(int, sys.stdin.readline().split(' '))
ans = (l + k) // m
if ans * m < l + k:
	ans += 1
if ans * m <= n:
	print(ans)
else:
	print(-1)


import math as ma
import sys
from sys import exit
from decimal import Decimal as dec
from itertools import permutations

def li():
	return list(map(int, input().split()))

def num():
	return map(int, input().split())

def nu():
	return int(input())

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
(n, m, k, l) = num()
kk = 0
if (k + l) % m == 0:
	kk = (k + l) // m
else:
	kk = (k + l) // m + 1
z = kk * m
if z >= l and kk * m <= n:
	print(int(kk))
else:
	print(-1)


(n, m, k, l) = map(int, input().split())
give = (k + l) // m
if (k + l) % m != 0:
	give += 1
if give * m > n or k + l > n or give * m - k < l:
	print(-1)
else:
	print(give)


(N, M, K, L) = map(int, input().split())
ans = (L + K) // M + (0 if (L + K) % M == 0 else 1)
print(ans if M * ans <= N else -1)


(n, m, k, l) = list(map(int, input().split()))

def c(a, b):
	if not a % b:
		return a // b
	else:
		return a // b + 1
a = c(k, m)
a += c(max(0, l - (m * c(k, m) - k)), m)
if m * a > n:
	print(-1)
else:
	print(a)


import sys
(n, m, k, l) = [int(s) for s in input().split()]
if (k + l) % m != 0:
	i = (k + l) // m + 1
else:
	i = (k + l) // m
if i * m > n:
	print(-1)
else:
	print(i)


(n, m, k, l) = map(int, input().split())

def ceil(a, b):
	return -(-a // b)

def solve(n, m, k, l):
	mi = k + l
	ans = ceil(mi, m)
	if ans * m <= n:
		return ans
	else:
		return -1
print(solve(n, m, k, l))


(N, M, K, L) = map(int, input().split())
if N < K + L:
	print(-1)
else:
	x = (L + K + M - 1) // M
	print(-1 if x * M > N else x)


import sys, math
data = sys.stdin.readlines()
(N, M, K, L) = list(map(int, data[0].strip().split()))
x = -(-(K + L) // M)
print((x, -1)[M * x > N])


import sys
(N, M, K, L) = map(int, input().split())
if M > N:
	print(-1)
	sys.exit()
i = -(-(K + L) // M)
if i <= 0:
	print(-1)
	sys.exit()
if i * M > N:
	print(-1)
	sys.exit()
print(i)


(n, m, k, l) = map(int, input().split())
if m > n or k + l > n:
	print('-1')
	exit(0)
ans = 0
ans += (l + k) // m
if (l + k) % m != 0:
	ans += 1
if ans * m > n:
	print('-1')
else:
	print(ans)


import math
from decimal import *
(no_coin_types, no_friends, ivans_coins, minimum_new_coins) = map(int, input().split())
min_coins_to_give = ivans_coins + minimum_new_coins
coins_per_person = math.ceil(Decimal(min_coins_to_give) / Decimal(no_friends))
if coins_per_person * no_friends > no_coin_types:
	print(-1)
else:
	print(coins_per_person)


(n, m, k, l) = map(int, input().split())
if n < m:
	print(-1)
elif k + l > n:
	print(-1)
elif m >= k + l:
	print(1)
else:
	v = (k + l) / m
	if int(v) * m >= k + l:
		if v * m <= n:
			print(int(v))
		else:
			print(-1)
	elif (int(v) + 1) * m >= k + l:
		if (int(v) + 1) * m <= n:
			print(int(v) + 1)
		else:
			print(-1)
	else:
		print(-1)


import sys
(n, m, k, l) = map(int, input().split())
p = int(k + l)
if k == 1000000000000000000 or l == 1000000000000000000:
	print(-1)
	sys.exit()
if p % m != 0:
	if (int(p / m) + 1) * m <= n:
		print(int(p / m) + 1)
	else:
		print(-1)
elif p / m * m <= n:
	print(int(p / m))
else:
	print(-1)


(n, m, k, l) = map(int, input().split())
r = n - k
if m > n:
	print(-1)
else:
	z = l + k
	a = (l + k) // m
	if (l + k) % m != 0:
		a += 1
	if a * m > n:
		print(-1)
	else:
		print(a)


import math, sys

def mp():
	return list(map(int, input().split()))

def main():
	(n, m, k, l) = mp()
	ost = n - k
	need = l + k
	if ost < l or need > n:
		print(-1)
		return
	ans = (l + k - 1) // m + 1
	if ans * m - k >= l and ans * m <= n:
		print(ans)
	else:
		print(-1)
deb = 0
if deb:
	file = open('input.txt', 'r')
	input = file.readline
else:
	input = sys.stdin.readline
main()
if deb:
	file.close()


from math import *
(n, m, k, l) = map(int, input().split())
beli = ceil((k + l + m - 1) // m)
if beli * m > n:
	print(-1)
else:
	print(beli)


(N, M, K, L) = [int(s) for s in input().split()]
import math

def check():
	if L + K > N:
		print(-1)
		return
	s = int((L + K) / M)
	if (L + K) % M > 0:
		s += 1
	if s >= 1 and s * M <= N:
		print(s)
		return
	print(-1)
	return
check()


t = input().split(' ')
n = int(t[0])
m = int(t[1])
k = int(t[2])
l = int(t[3])
cnt = 0
result = -1
if m <= n:
	cnt = round((l + k) / m)
	while cnt * m <= n:
		if cnt * m - k >= l:
			result = cnt
			break
		cnt += 1
print(result)


(n, m, k, L) = map(int, input().split())
(l, r) = (0, n // m)
while l <= r:
	mid = (l + r) // 2
	if m * mid - k >= L:
		r = mid - 1
	else:
		l = mid + 1
l = min(l, n // m)
if m * l - k >= L:
	print(l)
else:
	print('-1')


(ncoins, nfriends, collection_size, nnew_coins) = [int(x) for x in input().split()]
min_number_of_coins = collection_size + nnew_coins
ncoins_per_friend = min_number_of_coins // nfriends + (min_number_of_coins % nfriends != 0)
result = ncoins_per_friend
if ncoins_per_friend * nfriends > ncoins:
	result = -1
if min_number_of_coins > ncoins:
	result = -1
print(result)


(n, m, k, L) = map(int, input().split())
q = (L + k + m - 1) // m
if q * m > n:
	print(-1)
else:
	print(q)


(n, m, k, l) = [int(i) for i in input().split(' ')]
from math import ceil
from decimal import *
b = ceil(Decimal(k + l) / m)
p = n / m
import sys
if l == 0:
	print(0)
	sys.exit(0)
if m * b <= n and m * b - k >= l:
	print(b)
	sys.exit(0)
print(-1)


import math
(n, m, k, l) = tuple(map(int, input().split()))
if n < m or n < l or l + k > n:
	print(-1)
else:
	r = int((l + k) / m)
	if r * m < l + k:
		r += 1
	print(-1) if r * m > n else print(r)


def main():
	s = [int(x) for x in input().split()]
	n = s[0]
	m = s[1]
	k = s[2]
	l = s[3]
	ans = -1
	if k + l <= n and m <= n:
		c = k + l
		if c % m == 0:
			ans = c // m
		else:
			ans = c // m + 1
	if ans != -1 and ans * m <= n:
		print(ans)
	else:
		print('-1')
main()


import math
(no_coin_types, no_friends, ivans_coins, minimum_new_coins) = map(int, input().split())
min_coins_to_give = ivans_coins + minimum_new_coins
coins_per_person = min_coins_to_give // no_friends + (1 if min_coins_to_give % no_friends else 0)
if coins_per_person * no_friends > no_coin_types:
	print(-1)
else:
	print(coins_per_person)


(n, m, k, z) = map(int, input().split())
x = (z + k) // m
if n - k < z:
	print(-1)
	exit(0)
if (z + k) % m != 0:
	x += 1
if n >= x * m:
	print(x)
	exit(0)
else:
	print(-1)
	exit(0)
print(-1)


[n, m, k, l] = [int(i) for i in input().split()]
if l + k > n:
	print(-1)
elif (l + k) % m == 0:
	print((l + k) // m)
elif (l + k) // m + 1 <= n // m:
	print((l + k) // m + 1)
else:
	print(-1)


(N, M, K, L) = map(int, input().split())
kk = N // M
i = (L + K - 1) // M + 1
c = 0
if i <= kk:
	print(i)
else:
	print('-1')


(N, M, K, L) = map(int, input().split())
summ = (L - 1 + K) // M + 1
if N - K < L:
	print(-1)
elif M * summ > N:
	print(-1)
else:
	print(summ)


def main():
	(n, m, k, l) = map(int, input().split())
	hm = (l + k) // m if (l + k) % m == 0 else (l + k) // m + 1
	return hm if l + k <= hm * m <= n else -1
res = main()
print(res)


(n, m, k, l) = list(map(int, input().split()))
target = l + k
perfriend = target // m + (1 if target % m else 0)
if perfriend * m > n or m > n or target > n:
	print(-1)
else:
	print(perfriend)


(n, m, k, l) = map(int, input().split())
if n - k < l:
	print(-1)
	exit()
(left, right) = (0, n + 1)
while right - left > 1:
	middle = (left + right) // 2
	if m * middle - k >= l:
		right = middle
	else:
		left = middle
if m * right > n:
	print(-1)
else:
	print(int(right))


import sys, os, io

def rs():
	return sys.stdin.readline().rstrip()

def ri():
	return int(sys.stdin.readline())

def ria():
	return list(map(int, sys.stdin.readline().split()))

def ws(s):
	sys.stdout.write(s + '\n')

def wi(n):
	sys.stdout.write(str(n) + '\n')

def wia(a):
	sys.stdout.write(' '.join([str(x) for x in a]) + '\n')
import math, datetime, functools, itertools, operator, bisect, fractions
from collections import deque, defaultdict, OrderedDict, Counter
from fractions import Fraction
from decimal import Decimal

def main():
	starttime = datetime.datetime.now()
	if os.path.exists('input.txt'):
		sys.stdin = open('input.txt', 'r')
		sys.stdout = open('output.txt', 'w')
	for i in range(1):
		(n, m, k, l) = ria()
		a = (l + k + m - 1) // m
		if a * m <= n:
			print(a)
		else:
			print(-1)
	endtime = datetime.datetime.now()
	time = (endtime - starttime).total_seconds() * 1000
	if os.path.exists('input.txt'):
		print('Time:', time, 'ms')

class FastReader(io.IOBase):
	newlines = 0

	def __init__(self, fd, chunk_size=1024 * 8):
		self._fd = fd
		self._chunk_size = chunk_size
		self.buffer = io.BytesIO()

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self, size=-1):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, self._chunk_size if size == -1 else size))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

class FastWriter(io.IOBase):

	def __init__(self, fd):
		self._fd = fd
		self.buffer = io.BytesIO()
		self.write = self.buffer.write

	def flush(self):
		os.write(self._fd, self.buffer.getvalue())
		(self.buffer.truncate(0), self.buffer.seek(0))

class FastStdin(io.IOBase):

	def __init__(self, fd=0):
		self.buffer = FastReader(fd)
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

class FastStdout(io.IOBase):

	def __init__(self, fd=1):
		self.buffer = FastWriter(fd)
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.flush = self.buffer.flush
sys.stdin = FastStdin()
sys.stdout = FastStdout()
main()


(n, m, k, l) = map(int, input().split())
if l == 0:
	print(0)
else:
	pod = k + l
	if pod > n:
		print(-1)
	else:
		ans = -(-pod // m)
		if ans * m > n:
			print(-1)
		else:
			print(ans)


l = list(map(int, input().split()))
n = l[0]
m = l[1]
k = l[2]
L = l[3]
if L > n - k:
	print('-1')
elif m * ((L + k - 1) // m + 1) > n:
	print('-1')
else:
	print((L + k - 1) // m + 1)


(n, m, k, l) = map(int, input().split())
if n - k < l or n < m or n <= k:
	print('-1')
	exit(0)
wyn = int((l + k) / m)
if wyn * m < k + l:
	wyn += 1
if wyn == 0 or wyn * m > n:
	print('-1')
	exit(0)
print(wyn)


import math
import queue
(n, m, k, l) = map(int, input().split())
p = (l + k) // m
if (l + k) % m != 0:
	p += 1
if m * p <= n:
	print(p)
else:
	print(-1)


(n, m, k, l) = map(int, input().split())
ans = n // m
a = 0
mid = 0
flag = 0
num = n // m * m - k
if m > n or num < l:
	print(-1)
else:
	(lo, h) = (1, ans)
	while h >= lo:
		mid = (h + lo) // 2
		a = mid * m - k
		if a == l:
			flag = 1
			break
		elif a < l:
			lo = mid + 1
		else:
			h = mid - 1
	if flag == 1:
		print(mid)
	elif mid * m - k < l:
		print(mid + 1)
	else:
		print(mid)


(n, m, k, l) = map(int, input().split())
r1 = (k + l) // m
if (k + l) % m != 0:
	r1 += 1
if r1 * m > n:
	print('-1')
else:
	print(r1)


(n, m, k, l) = map(int, input().split())
required = k + l
per_friend = (required + m - 1) // m
if per_friend * m > n:
	print(-1)
else:
	print(per_friend)


def f(N, M, K, L):
	if N == K:
		return -1
	elif N - K < L:
		return -1
	elif N < M:
		return -1
	else:
		x = (K + L + M - 1) // M
		if int(x) * M > N:
			return -1
		else:
			return x
(N, M, K, L) = map(int, input().split())
print(f(N, M, K, L))


(n, m, k, l) = map(int, input().split())
if n < m:
	print(-1)
elif m * (n // m) - k < l:
	print(-1)
else:
	i = (l + k) // m
	while i <= n // m:
		if i * m - k >= l:
			print(i)
			break
		i += 1


(n, m, k, l) = [int(x) for x in input().strip().split(' ')]
x = -(-(k + l) // m)
if x * m > n:
	print(-1)
else:
	print(x)


def main():
	(n, m, k, l) = map(int, input().split())
	a = (k + l) // m
	ans = -1
	while True:
		if a * m > n:
			break
		if a * m >= k + l:
			ans = a
			break
		a += 1
	print(ans)
main()


(n, m, k, l) = list(map(int, input().split()))
if m > n or k + l > n:
	print(-1)
else:
	i = 1 if k + l <= m else (k + l) // m + 1 * ((k + l) % m > 0)
	if i <= n // m:
		print(i)
	else:
		print(-1)


import math
(n, m, k, l) = [int(x) for x in input().split()]
if m > n or k + l > n:
	print(-1)
else:
	up = n // m
	ans = (k + l - 1) // m + 1
	if ans <= n // m:
		print(ans)
	else:
		print(-1)


(n, m, k, l) = map(int, input().split())
if m > n:
	print(-1)
else:
	(div, mod) = ((k + l) // m, (k + l) % m)
	if mod > 0:
		div += 1
	if m * div > n:
		print(-1)
	else:
		print(div)


from math import *

def ceilInt(a, b):
	return a if b == 1 else (a + b - 1) // b

def scanLine(dtype):
	return list(map(dtype, input().split(' ')))
(n, m, k, l) = scanLine(int)
r = ceilInt(l + k, m)
if m * r < l or m * r > n or l > n - k:
	print(-1)
else:
	print(r)


gi = lambda : list(map(int, input().split()))
(N, M, K, L) = gi()
if K + L > N:
	print(-1)
	exit()
if (K + L) % M == 0:
	print((K + L) // M)
	exit()
ans = K + L + (M - (K + L) % M)
if ans > N:
	print(-1)
	exit()
print(ans // M)


from math import *
from random import *
(n, m, k, l) = map(int, input().split())
if k + l > n or n - n % m < k + l:
	print(-1)
	exit()
lb = 0
rb = 10 ** 18 + 5
while rb - lb > 1:
	mid = (rb + lb) // 2
	if mid * m >= k + l:
		rb = mid
	else:
		lb = mid
print(rb)


def main():
	(n, m, k, l) = map(int, input().split())
	d = (l + k) // m
	if (l + k) % m:
		d += 1
	if m * d > n or n - k < l:
		print(-1)
	else:
		print(d)
main()


x = list(map(int, input().split()))
kol_vo = x[0]
friends = x[1]
had = x[2]
new = x[3]
if (new + had) % friends != 0:
	i = (new + had) // friends + 1
else:
	i = (new + had) // friends
if kol_vo < friends * i:
	print(-1)
else:
	print(i)


import math
(n, m, k, l) = map(int, input().strip().split(' '))
if m > n:
	print(-1)
elif k + l > n:
	print(-1)
else:
	p = k + l
	if p < m:
		print(1)
	else:
		if p % m == 0:
			k1 = p // m
		else:
			k1 = p // m + 1
		if k1 * m <= n:
			print(k1)
		else:
			print(-1)


import sys
from math import *

def minp():
	return sys.stdin.readline().strip()

def mint():
	return int(minp())

def mints():
	return map(int, minp().split())
(N, M, K, L) = mints()
r = K + L
if K + L > N:
	print(-1)
	exit(0)
m = (K + L + M - 1) // M
if m * M > N:
	print(-1)
	exit(0)
print(m)


import math
(n, m, k, l) = [int(x) for x in input().split()]
if m > n or l > n:
	print(-1)
	exit(0)
times = (l + k + m - 1) // m
if times * m > n:
	print(-1)
	exit(0)
else:
	print(times)


(n, m, k, l) = map(int, input().split())
count = -(-(k + l) // m)
print((count, -1)[m * count > n])


x = list(map(int, input().split()))
i = x[1]
c = 1
flag = True
if x[1] <= x[0] and x[0] - x[2] >= x[3]:
	if x[0] < 10000 or x[0] / x[1] < 20:
		while i <= x[0]:
			if i - x[2] >= x[3]:
				print(c)
				flag = True
				break
			else:
				i += x[1]
				c += 1
				flag = False
	else:
		if (x[3] + x[2]) % x[1] == 0:
			c = (x[3] + x[2]) // x[1]
		else:
			c = (x[3] + x[2]) // x[1] + 1
		print(c)
else:
	print('-1')
if not flag:
	print('-1')


import math

def problem(in1):
	inputs = list(map(int, in1.split()))
	coins = inputs[0]
	friends = inputs[1]
	ivans_coins = inputs[2]
	must_be_new = inputs[3]
	gift_coins = ivans_coins + must_be_new
	each = gift_coins // friends
	if gift_coins % friends > 0:
		each += 1
	if friends * each > coins:
		return -1
	return each
in1 = input()
result = problem(in1)
print(result)


(allmoney, friends, realmoney, mincount) = map(int, input().split())
giftedmoney = int((mincount + realmoney) / friends)
if giftedmoney * friends < mincount + realmoney:
	giftedmoney += 1
if allmoney >= giftedmoney * friends:
	print(giftedmoney)
else:
	print(-1)


(N, M, K, L) = list(map(int, input().split()))
each = (K + L) // M
if (K + L) % M != 0:
	each += 1
if each * M > N:
	print(-1)
else:
	print(each)


import os
import sys
from io import BytesIO, IOBase
import math
import itertools
import bisect
import heapq

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(int(n))
	return l

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)

def countcon(s, i):
	c = 0
	ch = s[i]
	for i in range(i, len(s)):
		if s[i] == ch:
			c += 1
		else:
			break
	return c

def lis(arr):
	n = len(arr)
	lis = [1] * n
	for i in range(1, n):
		for j in range(0, i):
			if arr[i] > arr[j] and lis[i] < lis[j] + 1:
				lis[i] = lis[j] + 1
	maximum = 0
	for i in range(n):
		maximum = max(maximum, lis[i])
	return maximum

def isSubSequence(str1, str2):
	m = len(str1)
	n = len(str2)
	j = 0
	i = 0
	while j < m and i < n:
		if str1[j] == str2[i]:
			j = j + 1
		i = i + 1
	return j == m

def maxfac(n):
	root = int(n ** 0.5)
	for i in range(2, root + 1):
		if n % i == 0:
			return n // i
	return n

def p2(n):
	c = 0
	while n % 2 == 0:
		n //= 2
		c += 1
	return c

def seive(n):
	primes = [True] * (n + 1)
	primes[1] = primes[0] = False
	for i in range(2, n + 1):
		if primes[i]:
			for j in range(i + i, n + 1, i):
				primes[j] = False
	p = []
	for i in range(0, n + 1):
		if primes[i]:
			p.append(i)
	return p

def ncr(n, r, p):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % p
		den = den * (i + 1) % p
	return num * pow(den, p - 2, p) % p

def denofactinverse(n, m):
	fac = 1
	for i in range(1, n + 1):
		fac = fac * i % m
	return pow(fac, m - 2, m)

def numofact(n, m):
	fac = 1
	for i in range(1, n + 1):
		fac = fac * i % m
	return fac
(n, m, k, l) = map(int, input().split())
mi = math.ceil(k / m)
cg = mi * m
mi += max((l - cg + k + m - 1) // m, 0)
if mi * m > n:
	print(-1)
else:
	print(mi)


import sys, math
(N, M, K, L) = map(int, sys.stdin.readline().split())
if L > N - K or M > N:
	print(-1)
else:
	c = (K + L + M - 1) // M
	if M * c > N:
		print(-1)
	else:
		print(c)


def Main():
	(total, friends, collection, limit) = map(int, input().split())
	mn = (collection + limit + friends - 1) // friends
	if mn * friends <= total:
		print(mn)
	else:
		print('-1')
t = 1
for _ in range(t):
	Main()


from math import *
(n, m, k, l) = map(int, input().split())
each = (k + l + m - 1) // m
if each * m <= n:
	print(each)
else:
	print('-1')


(N, M, K, L) = [int(x) for x in input().split()]
answer = (K + L + M - 1) // M
numberReqd = answer * M
if numberReqd <= N:
	print(answer)
else:
	print(-1)


from math import ceil
(n, m, k, l) = (int(i) for i in input().split())
if m > n or k + l > n:
	print(-1)
	exit(0)
expected = (k + l) // m + 1 if (k + l) % m != 0 else (k + l) // m
if m * expected > n:
	print(-1)
	exit(0)
print(expected)


def print_return(func):

	def wrapper(*args, **kwargs):
		retval = func(*args, **kwargs)
		print(retval)
		return retval
	return wrapper

class Solve:

	@print_return
	def solve_a(lines=None):
		if lines is None:
			(n, m, k, l) = (int(x) for x in input().split())
		else:
			(n, m, k, l) = (int(x) for x in lines[0].split())
		x = k + l + m - 1
		x //= m
		if x * m > n:
			return -1
		return x
Solve.solve_a()


(n, m, k, l) = map(int, input().split())
rem = n - k
if m > n:
	print(-1)
elif l > rem:
	print(-1)
else:
	ans = (l + k) // m
	if (l + k) % m:
		ans += 1
	if ans * m > n:
		print(-1)
	else:
		print(ans)


import math
import sys
DEBUG = False

def inp():
	return sys.stdin.readline().rstrip()

def dprint(*value, sep=' ', end='\n'):
	if DEBUG:
		print(*value, sep=sep, end=end)

def solve(N, M, K, L):
	lb = (L + K + M - 1) // M
	ub = N // M
	if lb > ub:
		return -1
	return lb

def main():
	(N, M, K, L) = [int(e) for e in inp().split()]
	print(solve(N, M, K, L))
main()


from sys import stdin, stdout
import cProfile, math
from collections import Counter
from bisect import bisect_left
import itertools
from fractions import Fraction
printHeap = str()
test = False
memory_constrained = False
N = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10000000)

def display(string_to_print):
	stdout.write(str(string_to_print) + '\n')

def primeFactors(n):
	factors = dict()
	for i in range(2, math.ceil(math.sqrt(n)) + 1):
		while n % i == 0:
			if i in factors:
				factors[i] += 1
			else:
				factors[i] = 1
			n = n // i
	if n > 2:
		factors[n] = 1
	return factors

def isprime(n):
	if n < 4:
		return True
	if n % 2 == 0:
		return False
	if n % 3 == 0:
		return False
	i = 5
	w = 2
	while i * i <= n:
		if n % i == 0:
			return False
		i += w
		w = 6 - w
	return True

def test_print(*args):
	if test:
		print(args)

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result
TestCases = False

def main():
	(n, m, k, l) = get_tuple()
	x = math.ceil(Fraction(k + l, m))
	print(x) if m * x <= n else print(-1)
if TestCases:
	for _ in range(get_int()):
		cProfile.run('main()') if test else main()
else:
	cProfile.run('main()') if test else main()


a = list(map(int, input().split()))
if a[0] // a[1] == 0:
	print(-1)
elif a[0] // a[1] * a[1] - a[2] < a[3]:
	print(-1)
else:
	print(-(-(a[2] + a[3]) // a[1]))


ip = input()
ipList = ip.split(' ')
n = int(ipList[0])
m = int(ipList[1])
k = int(ipList[2])
l = int(ipList[3])
if (k + l) % m == 0:
	x = (k + l) // m
else:
	x = (k + l) // m + 1
if x * m > n:
	print(-1)
else:
	print(x)


(n, m, k, l) = [int(el) for el in input().split()]
if m > n or k + l > n:
	print(-1)
	raise SystemExit
x1 = (k + l) // m
if (k + l) % m != 0:
	x1 += 1
x2 = n // m
if x2 < x1:
	print(-1)
	raise SystemExit
print(int(x1))
q = k + l
x1 = q / m
d = 4 + 5


from collections import defaultdict
import math
import os
import sys
from io import BytesIO, IOBase
from heapq import nlargest
from math import *
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
(n, m, k, l) = map(int, input().split())
val = l + k
x = 0
if val % m == 0:
	x = val // m
else:
	x = 1 + val // m
if x * m <= n:
	print(x)
else:
	print('-1')


(n, m, k, p) = map(int, input().split())
x = (p + k) // m
if (p + k) % m != 0:
	x += 1
if x * m > n:
	print(-1)
else:
	print(x)


(N, M, K, L) = map(int, input().split())
if K + L > N:
	print(-1)
else:
	cN = K + L
	cP = 0
	if cN % M == 0:
		cP = cN // M
	else:
		cP = cN // M + 1
	if cP * M > N:
		print(-1)
	else:
		print(cP)


(n, m, k, l) = map(int, input().split())
x = -(-(k + l) // m)
print((x, -1)[m * x > n])


def f(N, M, K, L):
	if N == K:
		return -1
	elif N - K < L:
		return -1
	elif N < M:
		return -1
	else:
		x = (K + L + M - 1) // M
		if int(x) * M > N:
			return -1
		else:
			return x

def r(n):
	return round(n + 0.5)
(N, M, K, L) = map(int, input().split())
print(f(N, M, K, L))


(n, m, k, l) = list(map(int, input().split()))
if l > n - k:
	print(-1)
else:
	am = (l + k) // m + bool((l + k) % m)
	if am * m > n:
		print(-1)
	else:
		print(am)


def getInts():
	return [int(n) for n in input().split()]
[N, M, K, L] = getInts()
newCoin = N - K
r = (L + K) // M
if (L + K) % M != 0:
	r += 1
if L > 0 and M > N or r * M > N:
	print(-1)
	exit()
if newCoin < L or r * M - K < L:
	print(-1)
	exit()
print(r)


import math
test = 1
for _ in range(test):
	(n, m, k, l) = map(int, input().split())
	h = (l + k) // m
	if h * m < l + k:
		h += 1
	if m * h <= n and m * h >= l + k:
		print(h)
	else:
		print(-1)


(N, friends, I, L) = map(int, input().split())
gift = (L + I) // friends
while gift * friends < L + I:
	gift += 1
if gift * friends > N:
	print(-1)
else:
	print(gift)


I = lambda : int(input())
ID = lambda : map(int, input().split())
IL = lambda : list(ID())
(N, M, K, L) = ID()
if (L + K) % M == 0:
	ans = (L + K) // M
else:
	ans = (L + K + M) // M
if M * ans > N:
	print(-1)
else:
	print(ans)


(n, m, k, l) = map(int, input().split())
need = k + l
if need % m == 0 and need <= n:
	print(need // m)
else:
	x = need // m + 1
	if x * m > n:
		print(-1)
	else:
		print(x)


import math
(n, m, k, l) = map(int, input().split())
x = (k + l) // m
if (k + l) % m != 0:
	x += 1
if k + l > n or m * x > n:
	exit(print('-1'))
else:
	print(x)


(n, m, k, l) = map(int, input().split())
if (l + k) % m == 0:
	z = (l + k) // m
else:
	z = (l + k) // m + 1
if m * z - k >= l and m * z <= n and (n - k >= l):
	print(z)
else:
	print(-1)


from math import ceil

def find_answer(num_coins, friends, ivans_coll, req_new):
	if friends > num_coins:
		return -1
	elif ivans_coll == num_coins:
		return -1
	else:
		coins_required = ivans_coll + req_new
		if coins_required > num_coins:
			return -1
		coins_per_friend = ceil(coins_required / friends)
		while coins_per_friend * friends < coins_required:
			coins_per_friend += 1
		if coins_per_friend * friends <= num_coins:
			return coins_per_friend
		else:
			return -1
print(find_answer(*map(int, input().split())))


import math
(n, m, k, l) = map(int, input().split(' '))

def upper(n, x):
	(lo, hi, ans) = (0, 1000000000000000000, -1)
	while lo <= hi:
		mid = lo + hi >> 1
		g = mid * x
		if g >= n:
			ans = g
			hi = mid - 1
		else:
			lo = mid + 1
	return ans
if k + l > n:
	print(-1)
else:
	t = k + l
	hi = upper(t, m)
	if hi <= n:
		print(hi // m)
	else:
		print(-1)


import math
(n, m, k, l) = map(int, input().split())
need = l + k
r = need % m
c = need // m
f = c
if r:
	f += 1
if f * m > n:
	print(-1)
else:
	print(f)


from math import *
(n, m, k, l) = map(int, input().split())
if m > n:
	print(-1)
	exit(0)
re = (l + k + m - 1) // m
if re * m > n:
	print(-1)
	exit(0)
print(re)


(N, M, K, L) = [int(x) for x in input().split(' ')]
Q = (L + K - 1) // M + 1
if Q * M > N:
	print(-1)
else:
	print(Q)


import sys
(n, m, k, L) = map(int, input().split())
coinPer = int((L + k) // m)
if (L + k) % m != 0:
	coinPer += 1
res = -1
if coinPer * m <= n:
	res = coinPer
print(res)


(n, m, k, l) = list(map(int, input().split()))
t = (k + l) // m
if k + l > m * t and m * (t + 1) <= n:
	print(t + 1)
elif k + l == m * t and m * t <= n:
	print(t)
else:
	print(-1)


from sys import stdin, stdout
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
L = lambda : list(R())
P = lambda x: stdout.write(x)
hg = lambda x, y: (y + x - 1) // x * x
pw = lambda x: 1 if x == 1 else 1 + pw(x // 2)
chk = lambda x: chk(x // 2) if not x % 2 else True if x == 1 else False
N = 10 ** 6
(n, m, k, l) = R()
mx = (k + l + m - 1) // m
if mx * m <= n:
	print(mx)
else:
	print(-1)


(n, m, k, l) = map(int, input().split())
import math
t = (l + k) // m
if (l + k) % m != 0:
	t += 1
if l > n - k:
	print(-1)
elif t * m > n:
	print(-1)
else:
	print(t)


import sys
from math import ceil

def rint():
	return map(int, sys.stdin.readline().split())
(N, M, K, L) = rint()
min_gpf = (L + min(N, K)) // M
if (L + min(N, K)) % M:
	min_gpf += 1
if min_gpf > N // M:
	print(-1)
else:
	print(min_gpf)


(n, m, k, l) = list(map(int, input().strip().split()))
flag = True
coins_remaining = n - k
total_coins = n
min_new_coins = l
min_coins_per_friend = (k + l + m - 1) // m
if min_coins_per_friend * m > n:
	flag = False
if min_new_coins > coins_remaining:
	flag = False
if flag:
	print(min_coins_per_friend)
else:
	print(-1)


import math
from decimal import *
getcontext().prec = 20
(N, M, K, L) = [int(x) for x in input().split()]
totalCoinsNeeded = Decimal(K + L)
totalCoinsActual = math.ceil(totalCoinsNeeded / M) * M
if L == 0:
	print(0)
elif N >= totalCoinsActual:
	print(totalCoinsActual // M)
else:
	print(-1)


from math import *
(n, m, k, l) = [int(i) for i in input().split(' ')]
if (l + k) % m == 0:
	each = (l + k) // m
else:
	each = (l + k) // m + 1
if m * each <= n:
	print(each)
else:
	print(-1)


[n, m, k, l] = [int(i) for i in input().split()]
cnt = (l + k + m - 1) // m
if cnt * m > n:
	print(-1)
else:
	print(cnt)


def solve(N, M, K, L):
	up = N // M
	if up == 0:
		return -1
	ans = (K + L - 1) // M + 1
	if ans > up:
		return -1
	return ans
(N, M, K, L) = map(int, input().split(' '))
print(solve(N, M, K, L))


def bin_s(s, e):
	if s < e:
		mid = (s + e) // 2
		if m * mid - k == l:
			return mid
		elif m * mid - k > l:
			return bin_s(s, mid)
		elif m * mid - k < l:
			return bin_s(mid + 1, e)
	else:
		return s
(n, m, k, l) = map(int, input().split())
max_c = n // m
if max_c == 0:
	print(-1)
elif max_c * m - k < l:
	print(-1)
else:
	print(bin_s(1, max_c))


(n, m, k, l) = map(int, input().split())
r = 0
if n // m * m - k < l:
	r = -1
elif (k + l) % m == 0:
	r = (k + l) // m
elif (k + l) % m != 0:
	r = (k + l) // m + 1
print(r)


(n, m, k, l) = map(int, input().split())
if m > n:
	print(-1)
	exit()
if n < l + k:
	print(-1)
	exit()
if l + k < m:
	print(1)
elif (l + k) % m == 0:
	s = (l + k) // m
	if s * m > n:
		print(-1)
		exit()
	print(s)
else:
	s = (l + k) // m + 1
	if s * m > n:
		print(-1)
		exit()
	print(s)


import math
(n, m, k, l) = map(int, input().split())
give = (k + l) // m
if (k + l) % m != 0:
	give += 1
print(give if give * m <= n else -1)


def main():
	string = input('')
	wordlist = string.split()
	n = int(wordlist[0])
	m = int(wordlist[1])
	k = int(wordlist[2])
	l = int(wordlist[3])
	res = 0
	res = (k + l) // m
	if (k + l) % m != 0:
		res += 1
	if n < res * m or n - k < l or n < m:
		print(-1)
		return
	else:
		print(res)
		return
main()


def compute(N, M, K, L):
	if N < M:
		return -1
	min_coin_gift = K + L
	i = min_coin_gift // M
	while True:
		coin_given = i * M
		if min_coin_gift <= coin_given <= N and coin_given % M == 0:
			return i
		elif coin_given > N:
			return -1
		else:
			i += 1

def run():
	(N, M, K, L) = [int(e) for e in input().split(' ')]
	res = compute(N, M, K, L)
	print(res)
run()


import sys
import math
(n, m, k, l) = map(int, sys.stdin.readline().strip().split())
ans = (k + l) // m + int((k + l) % m > 0)
if ans * m > n:
	print(-1)
else:
	print(ans)


(n, m, k, l) = list(map(int, input().split()))
q = (l + k - 1) // m + 1
if q * m > n:
	print(-1)
else:
	print(q)


def up(k, p):
	if k % p == 0:
		return k // p
	else:
		return k // p + 1
(n, k, m, new) = map(int, input().split())
if up(m + new, k) * k > n or n == m:
	print(-1)
elif up(m + new, k) * k - m >= new:
	print(up(m + new, k))


def happy_birthday(n, m, k, l):
	result = (l + k) // m
	if result * m < l + k:
		result += 1
	if result * m > n:
		return -1
	return result
(N, M, K, L) = [int(i) for i in input().split()]
print(happy_birthday(N, M, K, L))


(n, m, k, l) = map(int, input().split(' '))
if l > n or k > n or m > n or (l > n - k):
	print(-1)
else:
	coins_required = k + l
	if coins_required % m == 0:
		coins = int(coins_required / m)
	else:
		coins = 1 + coins_required // m
	if coins * m > n:
		print(-1)
	else:
		print(coins)


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
(n, m, k, l) = f()
t = (k + l + m - 1) // m
print(t if t <= n // m else -1)


(n, m, k, l) = map(int, input().split())
mn = k + l
if mn % m == 0:
	q = mn // m
else:
	q = mn // m + 1
if q * m > n:
	print('-1')
else:
	print(q)


(n, m, k, l) = map(int, input().split())
if m > n:
	print(-1)
elif l + k > n:
	print(-1)
else:
	s = (l + k) // m + bool((l + k) % m)
	if s * m > n:
		print(-1)
	else:
		print(s)


from math import ceil
from decimal import Decimal
(N, M, K, L) = [int(i) for i in input().split()]
CoinsXFriend = ceil(Decimal(K + L) / M)
minCoins = M * CoinsXFriend
print(CoinsXFriend if N >= minCoins else -1)


(N, M, K, L) = map(int, input().split())
if N < M or K + L > N:
	print(-1)
else:
	q = (L + K) // M + int((L + K) % M != 0)
	if q * M > N:
		print(-1)
	else:
		print(q)


def cel(x, y):
	v = x // y
	if x - y * v == 0:
		return 0
	else:
		return 1
(n, m, k, l) = map(int, input().split())
if n < m:
	print(-1)
	exit()
ans = (l + k) // m + cel(l + k, m)
if ans * m > n:
	print(-1)
else:
	print(ans)


def check(number):
	if number * m <= n:
		if number * m - k >= L:
			return True
	return False

def bin_search():
	left = 0
	right = n // m
	while left < right - 1:
		middle = (left + right) // 2
		if check(middle):
			right = middle
		else:
			left = middle
	return right
(n, m, k, L) = map(int, input().split())
a = bin_search()
if not check(a):
	print(-1)
else:
	print(a)


from sys import stdin, stdout
import math
(n, m, k, l) = map(int, stdin.readline().split())
if m > n:
	print(-1)
elif l == 0:
	print(0)
else:
	x = (l + k) // m
	if (l + k) % m != 0:
		x += 1
	if x * m > n:
		print(-1)
	else:
		print(x)


from math import *
(n, m, k, l) = [int(s) for s in input().split()]
if (l + k) % m == 0:
	c_m = (l + k) // m
else:
	c_m = (l + k) // m + 1
if n >= c_m * m and c_m != 0:
	print(c_m)
else:
	print(-1)


from sys import stdin, stdout
from math import sin, tan, cos
(n, m, k, l) = map(int, stdin.readline().split())
(lb, rb) = (0, n // m + 1)
while rb - lb > 1:
	mid = lb + rb >> 1
	if mid * m - k >= l:
		rb = mid
	else:
		lb = mid
if lb != n // m:
	stdout.write(str(rb))
else:
	stdout.write('-1')


q = tuple(map(int, input().split()))
v = (q[2] + q[3] + q[1] - 1) // q[1]
if v * q[1] > q[0]:
	print(-1)
else:
	print(v)


(coins, friends, owned, different) = map(int, input().split())
if friends > coins or different + owned > coins:
	print(-1)
else:
	get = (owned + different + friends - 1) // friends
	if get * friends > coins:
		print(-1)
	else:
		print(get)


(n, m, k, l) = map(int, input().split())
h = k + l
if h % m == 0:
	g = h // m
else:
	g = h // m + 1
if g * m > n:
	print(-1)
else:
	print(g)


from io import BytesIO, IOBase
from math import sqrt
import sys
from os import path
import os
inpl = lambda : list(map(int, input().split()))
inpm = lambda : map(int, input().split())
inpi = lambda : int(input())
inp = lambda : input()
(rev, ra, l) = (reversed, range, len)
P = print
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')

def B(n):
	return bin(n).replace('0b', '')

def factors(n):
	arr = []
	for i in ra(2, int(sqrt(n)) + 1):
		if n % i == 0:
			arr.append(i)
			if i * i != n:
				arr.append(int(n / i))
	return arr

def dfs(arr, n):
	pairs = [[i + 1] for i in ra(n)]
	vis = [0] * (n + 1)
	for i in ra(l(arr)):
		pairs[arr[i][0] - 1].append(arr[i][1])
	pairs[arr[i][1] - 1].append(arr[i][0])
	comp = []
	for i in ra(n):
		stack = [pairs[i]]
		temp = []
		if vis[stack[-1][0]] == 0:
			while len(stack) > 0:
				if vis[stack[-1][0]] == 0:
					temp.append(stack[-1][0])
					vis[stack[-1][0]] = 1
					s = stack.pop()
					for j in s[1:]:
						if vis[j] == 0:
							stack.append(pairs[j - 1])
				else:
					stack.pop()
			comp.append(temp)
	return comp
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
from bisect import bisect_left as bl
from bisect import bisect_right as br
from collections import Counter
import math, heapq
(n, m, k, l) = inpm()
if n < m:
	P(-1)
elif l > n:
	P(-1)
else:
	su = l + k
	if su % m == 0:
		give = su // m
	else:
		give = su // m + 1
	if give * m > n:
		P(-1)
	else:
		P(give)


import sys
import math
(N, M, K, L) = [int(i) for i in input().split()]
ans = int((K + L + M - 1) // M)
if ans * M > N:
	ans = -1
print(ans)


from sys import exit
(n, m, k, l) = map(int, input().split())
if n - l < k:
	print(-1)
	exit()
q = (k + l - 1 + m) // m
if q * m > n:
	print(-1)
	exit()
print((k + l - 1 + m) // m)


(n, m, k, l) = map(int, input().split())
h = -1
if n >= m and n - k >= l:
	if (l + k) % m == 0 and (l + k) // m * m <= n:
		h = (l + k) // m
	elif (l + k) % m != 0 and (1 + (l + k) // m) * m <= n:
		h = (l + k) // m + 1
	print(h)
else:
	print(h)


(n, m, k, l) = [int(x) for x in input().split(' ')]
if m > n and n != k:
	print(-1)
elif n == k and l == 0:
	print(0)
elif l > n - k:
	print(-1)
elif l + k >= m:
	if (l + k) % m == 0:
		a = (l + k) // m
		if a == 0:
			a = 1
		if a * m > n:
			print(-1)
		else:
			print(a)
	else:
		a = (l + k) // m + 1
		if a * m > n:
			print(-1)
		else:
			print((l + k) // m + 1)
else:
	print(1)


(n, m, k, l) = list(map(int, input().split()))
cmax = n // m
cmin = max(1, (l + k) // m if (l + k) % m == 0 else (l + k) // m + 1)
if cmax >= cmin:
	print(cmin)
else:
	print(-1)


(n, m, k, l) = input().split()
n = int(n)
m = int(m)
k = int(k)
l = int(l)
if m > n:
	print(-1)
else:
	i = 1
	if (l + k) % m == 0:
		x = (l + k) // m
	else:
		x = (l + k) // m + 1
	if m * x > n:
		print(-1)
	else:
		print(x)


import math
inp = input().split(' ')
N = int(inp[0])
M = int(inp[1])
L = int(inp[2])
K = int(inp[3])
mini = (L + K) // M
if M * mini < L + K:
	mini += 1
if mini * M > N:
	print('-1')
else:
	print(int(mini))


import sys
(n, m, k, l) = map(int, input().split())
if k + l > n:
	print(-1)
	sys.exit(0)
tmp = (l + k + m - 1) // m
if tmp * m > n:
	print(-1)
	sys.exit(0)
print(tmp)


(n, m, k, l) = list(map(int, input().split()))
if m > n:
	print(-1)
	exit()
per = n // m
uk1 = 0
if per * m >= l + k:
	while per - uk1 > 1:
		if (uk1 + per) // 2 * m < l + k:
			uk1 = (uk1 + per) // 2
		elif (uk1 + per) // 2 * m >= l + k:
			per = (uk1 + per) // 2
	print(per)
else:
	print(-1)


import sys
(n, m, k, l) = list(map(lambda x: int(x), sys.stdin.readline().split(' ')))
minN = k + l
if m == 0:
	print(-1)
else:
	eachN = minN // m
	if minN % m:
		eachN = eachN + 1
	if eachN * m > n or eachN == 0:
		print(-1)
	else:
		print(eachN)


def ceil(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1
import math
(n, m, k, l) = map(int, input().split())
if n < m:
	exit(print(-1))
ans = ceil(l + k, m)
if l == 0:
	exit(print(0))
if ans * m > n:
	print(-1)
else:
	print(ans)


(a, b, c, d) = map(int, input().split())
g = 0
if c + d > a:
	g = -1
elif (d + c) % b > 0:
	g = (c + d) // b + 1
else:
	g = (c + d) // b
if b * g > a:
	g = -1
print(g)