def find_target_position(nums, target):
    left, right = 0, len(nums) - 1
    
    while left <= right:
        mid = left + (right - left) // 2
        
        if nums[mid] == target:
            return mid
        elif nums[mid] < target:
            left = mid + 1
        else:
            right = mid - 1
            
    return left  # Position where the target would be inserted

# User input
user_input = input("Enter the sorted list of numbers (comma-separated): ")
target_input = input("Enter the target number: ")

# Process the input
nums = list(map(int, user_input.split(',')))
target = int(target_input)

# Find and print the position
position = find_target_position(nums, target)
print(f"The position of the target {target} is: {position}")