Program mooblitehas; var a,b,c,d:integer; begin readln(a);{detallide arv} readln(b);{esimene aeg} readln(c);{teine aeg} readln(d);{kolmas aeg} writeln ((a*b)+(a*c)+(a*d)); end.