// Arup Guha
// 6/5/2026
// Solution to Kattis Problem: Magic Trick
// https://open.kattis.com/problems/magictrick

using namespace std;
#include <bits/stdc++.h>

int main() {

    string s;
    cin >> s;
    bool flag = true;

    // Frequency array.
    vector<int> freq(26, 0);

    // Go through the letters.
    for (int i=0; i<s.size(); i++) {

        // Update frequency, subtract 'a' to get 0 to 25 value of letter.
        freq[s[i]-'a']++;

        // Repeat mark not possible.
        if (freq[s[i]-'a']>1)
            flag = false;
    }

    // Ta da!
    cout << flag << endl;
    return 0;
}
