def fibonacci(n):
    """
    Takes an integer n and returns the n-th term
    of Fibonacci series.
    """
    try:
        type(n) == int and n >= 1
    except:
        raise ValueError("Please input a positive integer.")
    if n == 1 or n == 2:
        return 1
    else:
        return fibonacci(n-1) + fibonacci(n-2)