#!/bin/sh set -o nounset -o errexit -o xtrace case ${1-undef} in undef) $0 2 1 0;; 0) echo $3;; 1) echo $2;; *) $0 $(($2 + $3)) $2 esac