#include #include #include #include #include #include #include using namespace std; int str_to_int(string &s) { int num; istringstream ss(s); if (!(ss >> num)) { return 0; } return num; } int main() { string stps, sequence; int seaLevel=0,totalSteps, current=0, valleys=0; bool below = false; getline(cin,stps); getline(cin, sequence); totalSteps = str_to_int(stps); current = seaLevel; for(int i=0;i=0 && below == true) { below = false; } } cout << valleys; return 0; }