def is_valid_parenthese(str1):
    count = 0
    for char in str1:
        if char == '(':
            count += 1
        elif char == ')':
            count -= 1
        if count < 0:
            return False
    return count == 0