A script that calculates debt