const arr = [3279, 920, 4181, 8];
let max = 0;
let result = 0;
arr.forEach(e=> max < e ? max = e : false);
function fibo() {
var f = [];
for (var c = 0; c < max; ++c) {
f.push((c < 2) ? c : f[c-1] + f[c-2]);
}
return f;
}
let fiboArr = fibo();
arr.forEach(e=>{
if(fiboArr.indexOf(e) != -1){
result += e;
}
})
console.log(result);