1)
var d, R, n, L:integer;
begin
readln(d);
readln(R);
readln(n);
if (d>0) and (R>0) and (n>0) and (d<=100) and (R<=100) and (n<=100) and (d<R) then begin
L:=(2*R+2*d)*n-(d*2)*(n-1);
writeln(L);
end;
end.
2)
var A, B, C:integer;
begin
readln(A);
readln(B);
readln(C);
if (A<>0) and (abs(A)<=100) and (B>0) and (C>0) and (C<=100) and (B<=100) then begin
if (A-B<0) and (A>0) then writeln(A-B-1+C) else writeln(A-B+C)
end;
end.
3)
var k,i,n:integer;
s:string;
begin
read(s);
k:=length(s);
if (k<=100) then begin
n:=k div 3;
for i:=1 to n do
begin
k:=k-3;
insert('.',s,k+1);
end;
if (s[1]='.') then delete(s,1,1);
write(s);
end;
end.
4)
var a,b,k,i,h,sum:integer;
begin
readln(a);
readln(b);
k:=0;
if(a<=b) then begin
for i:=a to b do
begin
sum:=0;
h:=i;
while(h>0)do
begin
sum:=sum+h mod 10;
h:=h div 10;
end;
if(sum mod 2=0) then k:=k+1;
end;
write(k);
end;
end.
var d, R, n, L:integer;
begin
readln(d);
readln(R);
readln(n);
if (d>0) and (R>0) and (n>0) and (d<=100) and (R<=100) and (n<=100) and (d<R) then begin
L:=(2*R+2*d)*n-(d*2)*(n-1);
writeln(L);
end;
end.
2)
var A, B, C:integer;
begin
readln(A);
readln(B);
readln(C);
if (A<>0) and (abs(A)<=100) and (B>0) and (C>0) and (C<=100) and (B<=100) then begin
if (A-B<0) and (A>0) then writeln(A-B-1+C) else writeln(A-B+C)
end;
end.
3)
var k,i,n:integer;
s:string;
begin
read(s);
k:=length(s);
if (k<=100) then begin
n:=k div 3;
for i:=1 to n do
begin
k:=k-3;
insert('.',s,k+1);
end;
if (s[1]='.') then delete(s,1,1);
write(s);
end;
end.
4)
var a,b,k,i,h,sum:integer;
begin
readln(a);
readln(b);
k:=0;
if(a<=b) then begin
for i:=a to b do
begin
sum:=0;
h:=i;
while(h>0)do
begin
sum:=sum+h mod 10;
h:=h div 10;
end;
if(sum mod 2=0) then k:=k+1;
end;
write(k);
end;
end.