-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAtcoder_ABCa.cpp
More file actions
67 lines (57 loc) · 1.4 KB
/
Atcoder_ABCa.cpp
File metadata and controls
67 lines (57 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define A(X) (X).begin(), (X).end()
#define F0R(i, a, b) for (int i = a; i < b; i++)
#define S2 S
#define PII pair<int, int>
#define PB push_back
#define MP make_pair
#define SQ(a) (a)*(a)
typedef long long ll;
typedef vector<int> vi;
#define E '\n'
typedef int64_t I64;
// policy based data structure
// using namespace __gnu_pbds;
// template <class T>
// using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// template <class T>
// using omset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k) returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;
// void solve() {
// // my code
// }
// long long dp[5005];
// const int mod = 998244353;
// check for prime number
// bool check(int x)
// {
// int i;
// for (i = 2; i <= sqrt(x); i++)
// {if (x % i == 0) return true;}
// return false;
//}
int main() {
#ifndef ONLINE_JUDGE
freopen("input1.txt", "r", stdin);
freopen("output1.txt", "w", stdout);
#endif
ios_base::sync_with_stdio(false);
cin.tie(0);
//code here
string s;
cin >> s;
int cnt = 0;
for (int i = 0; i < s.length(); i++) {
if (s[i] == '+') {
cnt++;
}
else {
cnt--;
}
}
cout << cnt;
}