#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef vector<int> vec;
int main(){
  string s; int ans=0; cin>>s;
  rep(i,4){if(s[i]=='+') ans++; else ans==;}
  cout<<ans;
}
