#import using namespace std;int N,X,A[1<<20],i,x,s,c;main(int t){for(cin>>N>>X;cin>>A[i];x=A[i++]<0?i:x);if(X<0){t*=-1;x--;X*=-1;}for(;0<=x&&x