Guest User

Untitled

a guest
Jun 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. S = input()
  2. def is_plus(a):
  3. if a == '+':
  4. return 1
  5. else:
  6. return -1
  7.  
  8. ans = 0
  9. for i in range(4):
  10. ans += is_plus(S[i])
  11. print(ans)
Add Comment
Please, Sign In to add comment