function p2=ex325(n)
    a(1)=1;a(2)=2;
    k=3;
    while(a(k-1)<n)
        a(k)=a(k-2)+a(k-1);
        k=k+1;
    end
    p2=sum(a(2:2:k-1));