if(tochki[i]<tochki[i+2]){
            br++;
        }
        if(tochki[i-2]<tochki[i]){
            br++;
        }
        if(tochki[i]>tochki[i+2]){
            br++;
        }
        if(tochki[i-2]>tochki[i]){
            br++;
        }