Skip to content

Instantly share code, notes, and snippets.

@showyou
Created June 23, 2018 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save showyou/dfa9b34b1deca3f16f32351a31086501 to your computer and use it in GitHub Desktop.
Save showyou/dfa9b34b1deca3f16f32351a31086501 to your computer and use it in GitHub Desktop.
S = input()
def is_plus(a):
if a == '+':
return 1
else:
return -1
ans = 0
for i in range(4):
ans += is_plus(S[i])
print(ans)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment