#include <iostream>
using namespace std;

void foo(int *x){
    (*x) = (*x)*(*x);
}

int main(){
	int x = 2;
	foo(&x);
    cout << x;
}
 