def josephus_survivor(n, k):
    """
    Finds the last survivor given an integer of the sum of people and an integer for the amount of steps to take.
    :param n: an integer of people.
    :param k: an integer of steps.
    :return: the lone survivor.
    """
    r = 0
    for x in range(1, n + 1):
        r = (r + k) % x
    return r + 1