def largest_prime_factor(number):
    """
    Calculate the largest prime factor of a number
    :param number: Number of which largest prime should be found
    :return: Integer: largest prime factor
    """
    count = 2
    while count * count <= number:
        if number % count:
            count += 1
        else:
            number //= count
    return int(number)