#!/bin/sh
op=$1
shift
y=0
 for x in "$@";
do y=$(($y $op $x))
 done
 echo $y
