from typing import Union
from typing import List


def find_min_rec(lst: Union[List[int], int]) -> int:
    """
    Return the smallest value in <lst>.

    >>> find_min_rec([3, 4, 5, 6, 7])
    3
    >>> find_min_rec([5, 6, 7, 3, 4])
    3
    """
    if not isinstance(lst, list):
        return lst
    else:
        return min(find_min_rec(s) for s in lst)