#include <iostream>
using namespace std;
int main (){
	int n, counter=1;
	cin>>n;
	char s[n];
	for (int i=0;i<n;i++){
	
	cin>>s[i];
	if (s[i]=='I')
	counter++;
	else if (s[i]=='D')
	counter--;
	
	
	}
	cout <<counter;
}