import itertools


def fibonacci():
    a, b = 0, 1
    while True:
        yield b
        a, b = b, a+b 

fib=fibonacci()

sum_ = sum([n for n in itertools.takewhile(lambda x: x < 400, fib)])
print sum_
# your code goes here