clear all;
clc;

N=2000;
arr=[1 1];
k=3;
i=0;

while arr(k-1)<=N
    arr(k)=arr(k-1)+arr(k-2);
    k=k+1;
end

arr=arr(1:(length(arr)-1));

odds=[];
evens=[];
nodds=0;
nevens=0;
sumevens=0;
sumodds=0;

arr

for i=1:length(arr)
    if mod(arr(i),2)==0
        sumevens=sumevens+arr(i);
        nevens=nevens+1;
    else
        sumodds=sumodds+arr(i);
        nodds=nodds+1;
    end
end

disp(sumevens);
disp(sumodds);
disp(nevens);
disp(nodds);