#include int main() { long int n,i,cost=0,count=0; char str[1000000]; scanf("%ld",&n); scanf("%s",str); for(i=0;str[i]!='\0';) { if(str[i]=='D') { cost=-1; i++; while(i