#include <iostream>
using namespace std;
int main()
{
int a = 100;
int x = 0, y = 0, z = 0;
int sum = 0;
do {
z = a % 10;
y = a / 10 % 10;
x = a / 100;
sum = pow(x,3) + pow(y,3) + pow(z,3);
if (sum == a)
{
cout << a << endl;
}
a++;
} while (a < 1000);
system("pause");
return 0;
}