#include <iostream>
using namespace std;
int main()
{
int n;
cout<<"Dati n: ";
cin>>n;
int S=0;
float MA=0;
for(int i=0;i<n;i++){
if(i%5==0){
S+=i;
MA++;
cout<<"\n"<<S;
cout<<"\n"<<MA;
}
}
if(MA!=0){
MA=S/MA;
}
cout<<"Media aritmetica este: "<< MA;
return 0;
}
program brainly;
var i,n,s:integer;
MA:real;
begin
s:=0;
MA:=0;
writeln ('Dati n:');
readln(n);
for i:=0 to n do begin
if i mod 5 = 0 then
begin
s:=s+i;
MA:=MA+1;
end
end;
if MA<>0 then
begin
MA:=S/MA;
end;
writeln('Media aritmetica este: ', MA:2:2);
end.