C, 132 116 113 8780
t,c;f(char*v){t=*v==45;c=atoifor(v+=t);forc=atoi(c=t?-c:c;*v;c+=tv+=t=*v==45);*v;t=0,++v)c+=t?50-*v-2*c:*v-47,++v)t=0;return47;return c;} Function f() takes the input as a string and returns the result as an integer. Full program version (113 bytes):
maint;main(int c,char**v){char*p=v[1],t=*p==45;c=atoichar*p=v[1];c=atoi(p+=tp+=t=*p==45);for(c=t?-c:c;*p;c+=tc;*p;++p,t=0)c+=t?50-*p:*p-47,++p)t=0;printf47;printf("%d\n",c);} Requires one argument.