def formatted_num_str(num):
    """
    Returns a formatted number string
    :param num: integer
    :return: formatted number string (with units)
    """
    if num >= 1_000_000_000:
        return f'{(num / 1_000_000_000):.1f}b'
    elif num >= 1_000_000:
        return f'{(num / 1_000_000):.1f}m'
    elif num >= 100_000:
        return f'{(num / 1_000):.0f}k'
    else:
        return f'{num:,}'