```#!/bin/bash sum=0 i=1 read n for ((i=1;i<=n;i++)) do read m sum=$(($sum+$m)) done echo "scale=3;$sum/$n" | bc