stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int n;

int main () {

cin >> n;

cout << (n*n*n) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270830058264555x):
#include <stdio.h>



int main (){



int x ;

int d ;

scanf ("%d" , &x );

d = x*x*x;

printf("%d" ,d );

	

 return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cmath>



using namespace std;



int main(void) {



	int input;



	cin >> input;



	cout<<pow(input, 3)<<endl;



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.3468345057107545x):
#include <stdio.h>



int main (){



int x ;

int d ;

scanf ("%d" , &x );

d = x*x*x;

printf("%d" ,d );

	

 return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cmath>

using namespace std;



int main()

{

    int N;

    cin>>N;

    if(N==1)

        cout<<N<<endl;

    else

        cout<<pow(N , 3)<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.346265142293821x):
#include <stdio.h>



int main (){



int x ;

int d ;

scanf ("%d" , &x );

d = x*x*x;

printf("%d" ,d );

	

 return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int main() {

    int num;

    cin >> num;

    cout << num*num*num;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.261629022032166x):
#include <stdio.h>



int main (){



int x ;

int d ;

scanf ("%d" , &x );

d = x*x*x;

printf("%d" ,d );

	

 return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#include <math.h>

using namespace std;

int main()

{

    int x,ans;

    cin>>x;

    ans=pow(x,3);

    cout<<ans<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.278019735072177x):
#include <stdio.h>

int main()

{

	int variabel;

	scanf("%d", &variabel);

	printf("%d", variabel*variabel*variabel);

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int main()

{

	int N;

	cin >> N;

	cout << N*N*N;

}

// Faster C++ solution for the same problem (measured speedup: 5.261629022032166x):
#include <stdio.h>

int main()

{

	int variabel;

	scanf("%d", &variabel);

	printf("%d", variabel*variabel*variabel);

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main() {

	int n;

	cin >> n;

	cout << n * n * n;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.261629022032166x):
#include <stdio.h>

int main()

{

	int variabel;

	scanf("%d", &variabel);

	printf("%d", variabel*variabel*variabel);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    int n;

    cin>>n;

    int res=1;

    for(int i=1;i<=3;i++){

        res*=n;

    }

    printf("%d\n",res);

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.248317537123195x):
#include <stdio.h>

int main()

{

	int variabel;

	scanf("%d", &variabel);

	printf("%d", variabel*variabel*variabel);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int n;

int main () {

	cin >> n;

	cout << n*n*n << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270830058264555x):
#include <stdio.h>

int main()

{

	int variabel;

	scanf("%d", &variabel);

	printf("%d", variabel*variabel*variabel);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main(){

	int n;cin>>n;cout<<pow(n,3)<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.3468345057107545x):
#include <stdio.h>

int main()

{

	int variabel;

	scanf("%d", &variabel);

	printf("%d", variabel*variabel*variabel);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int n;

int main () {

cin >> n;

cout << (n*n*n) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270830058264555x):
#include <stdio.h>

int main()

{

	int variabel;

	scanf("%d", &variabel);

	printf("%d", variabel*variabel*variabel);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cmath>



using namespace std;



int main(void) {



	int input;



	cin >> input;



	cout<<pow(input, 3)<<endl;



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.3468345057107545x):
#include <stdio.h>

int main()

{

	int variabel;

	scanf("%d", &variabel);

	printf("%d", variabel*variabel*variabel);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cmath>

using namespace std;



int main()

{

    int N;

    cin>>N;

    if(N==1)

        cout<<N<<endl;

    else

        cout<<pow(N , 3)<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.346265142293821x):
#include <stdio.h>

int main()

{

	int variabel;

	scanf("%d", &variabel);

	printf("%d", variabel*variabel*variabel);

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int main() {

    int num;

    cin >> num;

    cout << num*num*num;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.261629022032166x):
#include <stdio.h>

int main()

{

	int variabel;

	scanf("%d", &variabel);

	printf("%d", variabel*variabel*variabel);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#include <math.h>

using namespace std;

int main()

{

    int x,ans;

    cin>>x;

    ans=pow(x,3);

    cout<<ans<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.272619085045904x):
#include<stdio.h>



int main()

{



    int n;

   

    1<=n<=9;



    scanf("%d",&n);



    printf("%d\n", n*n*n);





    return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int main()

{

	int N;

	cin >> N;

	cout << N*N*N;

}

// Faster C++ solution for the same problem (measured speedup: 5.256245143543185x):
#include<stdio.h>



int main()

{



    int n;

   

    1<=n<=9;



    scanf("%d",&n);



    printf("%d\n", n*n*n);





    return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main() {

	int n;

	cin >> n;

	cout << n * n * n;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.256245143543185x):
#include<stdio.h>



int main()

{



    int n;

   

    1<=n<=9;



    scanf("%d",&n);



    printf("%d\n", n*n*n);





    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    int n;

    cin>>n;

    int res=1;

    for(int i=1;i<=3;i++){

        res*=n;

    }

    printf("%d\n",res);

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2429472794001315x):
#include<stdio.h>



int main()

{



    int n;

   

    1<=n<=9;



    scanf("%d",&n);



    printf("%d\n", n*n*n);





    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int n;

int main () {

	cin >> n;

	cout << n*n*n << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.2654367649611045x):
#include<stdio.h>



int main()

{



    int n;

   

    1<=n<=9;



    scanf("%d",&n);



    printf("%d\n", n*n*n);





    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main(){

	int n;cin>>n;cout<<pow(n,3)<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.341363442061283x):
#include<stdio.h>



int main()

{



    int n;

   

    1<=n<=9;



    scanf("%d",&n);



    printf("%d\n", n*n*n);





    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int n;

int main () {

cin >> n;

cout << (n*n*n) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.2654367649611045x):
#include<stdio.h>



int main()

{



    int n;

   

    1<=n<=9;



    scanf("%d",&n);



    printf("%d\n", n*n*n);





    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cmath>



using namespace std;



int main(void) {



	int input;



	cin >> input;



	cout<<pow(input, 3)<<endl;



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.341363442061283x):
#include<stdio.h>



int main()

{



    int n;

   

    1<=n<=9;



    scanf("%d",&n);



    printf("%d\n", n*n*n);





    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cmath>

using namespace std;



int main()

{

    int N;

    cin>>N;

    if(N==1)

        cout<<N<<endl;

    else

        cout<<pow(N , 3)<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.340794661236441x):
#include<stdio.h>



int main()

{



    int n;

   

    1<=n<=9;



    scanf("%d",&n);



    printf("%d\n", n*n*n);





    return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int main() {

    int num;

    cin >> num;

    cout << num*num*num;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.256245143543185x):
#include<stdio.h>



int main()

{



    int n;

   

    1<=n<=9;



    scanf("%d",&n);



    printf("%d\n", n*n*n);





    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#include <math.h>

using namespace std;

int main()

{

    int x,ans;

    cin>>x;

    ans=pow(x,3);

    cout<<ans<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.278019735072177x):
#include<stdio.h>

int main() {

	

	int nomor1;

	

	scanf("%d", &nomor1);

	printf("%d", nomor1*nomor1*nomor1);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int main()

{

	int N;

	cin >> N;

	cout << N*N*N;

}

// Faster C++ solution for the same problem (measured speedup: 5.261629022032166x):
#include<stdio.h>

int main() {

	

	int nomor1;

	

	scanf("%d", &nomor1);

	printf("%d", nomor1*nomor1*nomor1);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;

int main() {

	int n;

	cin >> n;

	cout << n * n * n;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.261629022032166x):
#include<stdio.h>

int main() {

	

	int nomor1;

	

	scanf("%d", &nomor1);

	printf("%d", nomor1*nomor1*nomor1);

	

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    int n;

    cin>>n;

    int res=1;

    for(int i=1;i<=3;i++){

        res*=n;

    }

    printf("%d\n",res);

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.248317537123195x):
#include<stdio.h>

int main() {

	

	int nomor1;

	

	scanf("%d", &nomor1);

	printf("%d", nomor1*nomor1*nomor1);

	

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int n;

int main () {

	cin >> n;

	cout << n*n*n << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270830058264555x):
#include<stdio.h>

int main() {

	

	int nomor1;

	

	scanf("%d", &nomor1);

	printf("%d", nomor1*nomor1*nomor1);

	

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main(){

	int n;cin>>n;cout<<pow(n,3)<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.3468345057107545x):
#include<stdio.h>

int main() {

	

	int nomor1;

	

	scanf("%d", &nomor1);

	printf("%d", nomor1*nomor1*nomor1);

	

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int n;

int main () {

cin >> n;

cout << (n*n*n) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.270830058264555x):
#include<stdio.h>

int main() {

	

	int nomor1;

	

	scanf("%d", &nomor1);

	printf("%d", nomor1*nomor1*nomor1);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cmath>



using namespace std;



int main(void) {



	int input;



	cin >> input;



	cout<<pow(input, 3)<<endl;



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.3468345057107545x):
#include<stdio.h>

int main() {

	

	int nomor1;

	

	scanf("%d", &nomor1);

	printf("%d", nomor1*nomor1*nomor1);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cmath>

using namespace std;



int main()

{

    int N;

    cin>>N;

    if(N==1)

        cout<<N<<endl;

    else

        cout<<pow(N , 3)<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.346265142293821x):
#include<stdio.h>

int main() {

	

	int nomor1;

	

	scanf("%d", &nomor1);

	printf("%d", nomor1*nomor1*nomor1);

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

using namespace std;



int main() {

    int num;

    cin >> num;

    cout << num*num*num;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.261629022032166x):
#include<stdio.h>

int main() {

	

	int nomor1;

	

	scanf("%d", &nomor1);

	printf("%d", nomor1*nomor1*nomor1);

	

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#include <math.h>

using namespace std;

int main()

{

    int x,ans;

    cin>>x;

    ans=pow(x,3);

    cout<<ans<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.272619085045904x):
 #include <stdio.h>

 int main (){

   

  int a;

  scanf("%d", &a);

  

  printf ("%d\n",a*a*a);

										  

 return 0;				

 }
// Slower C++ solution:
#include <iostream>

using namespace std;



int main()

{

	int N;

	cin >> N;

	cout << N*N*N;

}

// Faster C++ solution for the same problem (measured speedup: 5.256245143543185x):
 #include <stdio.h>

 int main (){

   

  int a;

  scanf("%d", &a);

  

  printf ("%d\n",a*a*a);

										  

 return 0;				

 }
// Slower C++ solution:
#include <iostream>

using namespace std;

int main() {

	int n;

	cin >> n;

	cout << n * n * n;

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.256245143543185x):
 #include <stdio.h>

 int main (){

   

  int a;

  scanf("%d", &a);

  

  printf ("%d\n",a*a*a);

										  

 return 0;				

 }
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int main()

{

    int n;

    cin>>n;

    int res=1;

    for(int i=1;i<=3;i++){

        res*=n;

    }

    printf("%d\n",res);

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2429472794001315x):
 #include <stdio.h>

 int main (){

   

  int a;

  scanf("%d", &a);

  

  printf ("%d\n",a*a*a);

										  

 return 0;				

 }
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int n;

int main () {

	cin >> n;

	cout << n*n*n << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.2654367649611045x):
 #include <stdio.h>

 int main (){

   

  int a;

  scanf("%d", &a);

  

  printf ("%d\n",a*a*a);

										  

 return 0;				

 }
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main(){

	int n;cin>>n;cout<<pow(n,3)<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.341363442061283x):
 #include <stdio.h>

 int main (){

   

  int a;

  scanf("%d", &a);

  

  printf ("%d\n",a*a*a);

										  

 return 0;				

 }
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

int n;

int main () {

cin >> n;

cout << (n*n*n) << endl;

}


// Faster C++ solution for the same problem (measured speedup: 5.2654367649611045x):
 #include <stdio.h>

 int main (){

   

  int a;

  scanf("%d", &a);

  

  printf ("%d\n",a*a*a);

										  

 return 0;				

 }
// Slower C++ solution:
#include <iostream>

#include <cmath>



using namespace std;



int main(void) {



	int input;



	cin >> input;



	cout<<pow(input, 3)<<endl;



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.341363442061283x):
 #include <stdio.h>

 int main (){

   

  int a;

  scanf("%d", &a);

  

  printf ("%d\n",a*a*a);

										  

 return 0;				

 }
// Slower C++ solution:
#include <iostream>

#include <cmath>

using namespace std;



int main()

{

    int N;

    cin>>N;

    if(N==1)

        cout<<N<<endl;

    else

        cout<<pow(N , 3)<<endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.340794661236441x):
 #include <stdio.h>

 int main (){

   

  int a;

  scanf("%d", &a);

  

  printf ("%d\n",a*a*a);

										  

 return 0;				

 }
// Slower C++ solution:
#include <iostream>

using namespace std;



int main() {

    int num;

    cin >> num;

    cout << num*num*num;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.256245143543185x):
 #include <stdio.h>

 int main (){

   

  int a;

  scanf("%d", &a);

  

  printf ("%d\n",a*a*a);

										  

 return 0;				

 }
// Slower C++ solution:
#include <cstdio>

#include <utility>

#include <vector>

static const int MAXN = 104;

static const int ALPHA = 26;



int h, w;

int ct[ALPHA] = { 0 };

std::vector<std::vector<std::pair<int, int>>> groups[5];

char s[MAXN][MAXN];



int main()

{

    scanf("%d%d", &h, &w); getchar();

    for (int i = 0; i < h; ++i) {

        for (int j = 0; j < w; ++j)

            ++ct[getchar() - 'a'];

        getchar();

    }



    for (int i = 0; i < (h + 1) / 2; ++i)

        for (int j = 0; j < (w + 1) / 2; ++j) {

            std::vector<std::pair<int, int>> g;

            g.push_back({ i, j });

            if (i * 2 != h - 1) {

                g.push_back({ h - 1 - i, j });

                if (j * 2 != w - 1) {

                    g.push_back({ i, w - 1 - j });

                    g.push_back({ h - 1 - i, w - 1 - j });

                }

            } else {

                if (j * 2 != w - 1)

                    g.push_back({ i, w - 1 - j });

            }

            //for (auto pos : g) printf(" (%d %d)", pos.first, pos.second); putchar('\n');

            groups[g.size()].push_back(g);

        }



    for (int i = 0; i < ALPHA; ++i) {

        for (int j = 4; j >= 1; --j)

            while (ct[i] >= j && !groups[j].empty()) {

                ct[i] -= j;

                for (auto pos : groups[j].back())

                    s[pos.first][pos.second] = i + 'a';

                groups[j].pop_back();

            }

    }



    for (int i = 1; i <= 4; ++i) if (!groups[i].empty()) { puts("No"); return 0; }



    /*for (int i = 0; i < h; ++i) {

        for (int j = 0; j < w; ++j) putchar(s[i][j]);

        putchar('\n');

    }*/

    puts("Yes");



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.909671685600145x):
#include <cstdio>

#include <algorithm>

static const int MAXN = 104;

static const int ALPHA = 26;



int h, w;

int ct[ALPHA] = { 0 };

int groups[5] = { 0 };



int main()

{

    scanf("%d%d", &h, &w); getchar();

    for (int i = 0; i < h; ++i) {

        for (int j = 0; j < w; ++j)

            ++ct[getchar() - 'a'];

        getchar();

    }



    for (int i = 0; i < (h + 1) / 2; ++i)

        for (int j = 0; j < (w + 1) / 2; ++j) {

            int u = 1;

            if (i * 2 != h - 1) {

                u += 1;

                if (j * 2 != w - 1) u += 2;

            } else {

                if (j * 2 != w - 1) u += 1;

            }

            groups[u] += 1;

        }



    for (int i = 0; i < ALPHA; ++i) {

        for (int j = 4; j >= 1; --j) {

            int dec = std::min(groups[j], ct[i] / j);

            ct[i] -= j * dec;

            groups[j] -= dec;

        }

    }



    bool valid = true;

    for (int i = 1; i <= 4; ++i) if (groups[i] > 0) valid = false;

    puts(valid ? "Yes" : "No");



    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



map<int, char> ans;



const int N = 1100;



int n, a, b, q;



int x[N], y[N], h[N];

char c[N][10];



int get(int pos) {

	while (1) {

		int now = upper_bound(y, y + b + 1, pos) - y - 1;

		if (now == 0 || h[now] == 0) return pos;

		int per = y[now] - h[now];

		pos -= ((pos - y[now]) / per + 1) * per;

	}

}



int main() {

	ios_base::sync_with_stdio(0);

	cin >> n >> a >> b >> q;

	for (int i = 1; i <= a; i++) cin >> x[i] >> c[i];

	y[0] = 1, y[b + 1] = n + 1;

	for (int i = 1; i <= b; i++) cin >> y[i] >> h[i];

	for (int i = 1; i <= a; i++) {

		ans[get(x[i])] = c[i][0];

	}

	for (int i = 1; i <= q; i++) {

		int z; cin >> z; 

//		cerr << z << endl;

		z = get(z);

//		cerr << z << endl;

		if (!ans.count(z)) cout << "?";

		else cout << ans[z];

	}

	cout << endl;

	return 0;

}




// Faster C++ solution for the same problem (measured speedup: 1.0970354011394157x):
#include<cstdio>

#include<map>

using namespace std;

const int N=1100;

int n,a,b,q,i,x,m,known[N];char ch[N][9];

int y[N],h[N];

map<int,char>T;

struct E{int l,d;E(){}E(int _l,int _d){l=_l,d=_d;}}e[N];

inline int go(int x){

    int i=m;

    while(1){

        while(i&&e[i].l>x)i--;

        int l=e[i].l,d=e[i].d;

        if(!i||!d)break;

        x-=((x-l)/d+1)*d;

    }

    return x;

}

int main(){

    scanf("%d%d%d%d",&n,&a,&b,&q);

    for(i=1;i<=a;i++)scanf("%d%s",&known[i],ch[i]);

    for(i=1;i<=b;i++)scanf("%d%d",&y[i],&h[i]);

    y[b+1]=n+1;

    for(i=1;i<=b;i++)e[++m]=E(y[i],h[i]?y[i]-h[i]:0);

    for(i=1;i<=a;i++)T[go(known[i])]=ch[i][0];

    while(q--){

        scanf("%d",&x);

        x=go(x);

        if(T.find(x)==T.end())putchar('?');else putchar(T[x]);

    }

    putchar('\n');

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

using namespace __gnu_pbds;

using namespace std;



typedef long long ll;

typedef pair<int,int> ii;

typedef tree<ii,null_type,less<ii>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;



int main() {

	cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);

	int N; string S; cin>>N>>S;

	map<int,int> b,w;

	for (int i=0; i<N; i++)

		if(S[i]=='#') b[i]++;

		else w[i]++;

	for (int i=1; i<N; i++)

		b[i]+=b[i-1];

	for (int i=N-2; i>=0; i--)

		w[i]+=w[i+1];

	int ret=min(b[N-1],w[0]);

	for (int i=0; i<N; i++)

		ret=min(ret,b[i]+w[i+1]);

	cout<<ret<<"\n";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.374629799463757x):
#include<cstdio>

int n;

char a[200200];

int cnt[200200][2]; // count of . and #

int main()

{

	// #. is a bad pattern

	// only possible patterns is ... followed by ###

	scanf("%d%s", &n, &a[1]);

	for (int i = 1; i <= n; i++)

	{

		cnt[i][0] = cnt[i - 1][0] + (a[i] == '.');

		cnt[i][1] = cnt[i - 1][1] + (a[i] == '#');

	}

	int ans = n;

	for (int i = 0; i <= n; i++) // number of .

	{

		int v = cnt[i][1] + (cnt[n][0] - cnt[i][0]);

		if (ans > v) ans = v;

	}

	printf("%d\n", ans);

	return 0;

}