Begin Writeln(((65+37)*((65-37) div 2 +1)) div 2); end.
Или более универсально: Var A,B : Integer; Begin Readln(A,B); Inc(A,Ord(not Odd(A))); Dec(B,Ord(not Odd(B))); Writeln(((B+A)*((B-A) div 2 +1)) div 2); end.
А если строго по заданию, то так: Var S,i : Integer; Begin s:=0; i:=37; Repeat s:=s+i; Inc(i,2); Until i>65; Writeln(s); end.