#include <stdio.h>

int main(){
	int s = 0;
	int t;
	int u;
	int v;
	char a;
	char b;
	char c;
	char d;

	scanf("%s%s%s%s",&a,&b,&c,&d);

		if(a = '+'){
			s += 1;
		} else if(a = '-'){
			s -= 1;
		}

		if(b = '+'){
			t =  s + 1;
		} else if(b = '-'){
			t = s - 1;
		}

		if(c = '+'){
			u = t + 1;
		} else if(c = '-'){
			u = t - 1;
		}

		if(d = '+'){
			v = u + 1;
		} else if(d = '-'){
			v= u - 1;
		}

	printf("%d\n", v);
}