Bitdefender Interview Question

One simple logic problem, mostly mathematics.