# Arup Guha
# 1/5/2013
# Solution to Programming Knights Practice Program Chapter 3 Problem 6
# Fibonacci Numbers

def main():

    # Get the input value - do some error checking.
    n = int(input("Which Fibonacci number do you want?\n"))

    # Base cases
    if n < 3:
        print("F(",n,")=1", sep="")

    # Regular looping case.
    else:

        # Initialize variables.
        fPrev = 1
        fCur = 1
        fNext = 1

        for i in range(3,n+1):

            # Get the next Fibonacci number.
            fNext = fPrev + fCur;

            # Update the previous and current ones.
            fPrev = fCur;
            fCur = fNext;

        # Print the answer.
        print("F(",n,") = ",fNext, sep="")


main()
