---
# System prepended metadata

title: gocode

---

# gocode

```
class Solution:
    def searchInsertionPosition(nums, target):
        start, end = 0, 0
        len(nums)-1
        while start+1 < end:
            mid = start + (end-start)//2
            if nums[mid] == target:
                end = mid
            if nums[mid] < target:
                start = mid
            else: 
                end = mid
        if nums[start] >= target:
            return start
        if nums[end] >= target:
            return end
        return end + 1

nums = list(map(int, input().split()))
nums.sort()
target = int(input())
print(Solution.searchInsertionPosition(nums, target))
```