#include <iostream>
using namespace std;

int main() {

    // write your code here......
    int a, b, c;
    int i = 0;
    for (i = 100; i < 1000; i++) {
        a = i / 100;
        b = (i / 10) % 10;
        c = (i % 100) % 10;
        if (i == (a * a * a) + (b * b * b) + (c * c * c))
            cout << i << endl;
    }

    return 0;
}