#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
using namespace std;
int main()
{
long long t, test, k, ans=0;
string str;
scanf("%lld", &test);
while(test--)
{
cin >> str;
if(str=="donate")
{
cin >> k;
ans = ans+k;
}
else if(str=="report")
{
cout << ans << endl;
}
}
return 0;
}
No comments:
Post a Comment