#include <iostream>
using namespace std;

int main() {
    
    int n;
    cin >> n;
    
    if(n % 4 == 0) {
        cout << "Nema ostatok" << endl;
    }
    else if(n % 4 == 1) {
        cout << "Ostatok 1" << endl;
    }
    else if(n % 4 == 2) {
        cout << "Ostatok 2" << endl;
    }
    else {
        cout << "Ostatok 3" << endl;
    }

    return 0;
}
