#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
string a;
vector <string> c;
vector<string> :: iterator it;// задаем итератор
cin>>a;
for(int i=0;i<a.size();i++)
{
for(int j=1;j<a.size();j++)
{
c.push_back(a.substr(i,j));
}
}
sort(c.begin(), c.end()); // сортируем вектор для функции unique
it = unique(c.begin(), c.end()); // задаем итератору значение функции unigue
c.resize(it - c.begin());// производим resize вектора при помощи итератора
cout<<c.size()+1;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglzdHJpbmcgYTsKCXZlY3RvciA8c3RyaW5nPiBjOwoJdmVjdG9yPHN0cmluZz4gOjogaXRlcmF0b3IgaXQ7Ly8g0LfQsNC00LDQtdC8INC40YLQtdGA0LDRgtC+0YAKCWNpbj4+YTsKCWZvcihpbnQgaT0wO2k8YS5zaXplKCk7aSsrKQoJewoJCWZvcihpbnQgaj0xO2o8YS5zaXplKCk7aisrKQoJCXsKCQkJYy5wdXNoX2JhY2soYS5zdWJzdHIoaSxqKSk7CgkJfQoJfQogCXNvcnQoYy5iZWdpbigpLCBjLmVuZCgpKTsgLy8g0YHQvtGA0YLQuNGA0YPQtdC8INCy0LXQutGC0L7RgCDQtNC70Y8g0YTRg9C90LrRhtC40LggdW5pcXVlCiAgICBpdCA9IHVuaXF1ZShjLmJlZ2luKCksIGMuZW5kKCkpOyAvLyDQt9Cw0LTQsNC10Lwg0LjRgtC10YDQsNGC0L7RgNGDINC30L3QsNGH0LXQvdC40LUg0YTRg9C90LrRhtC40LggdW5pZ3VlCiAgICBjLnJlc2l6ZShpdCAtIGMuYmVnaW4oKSk7Ly8g0L/RgNC+0LjQt9Cy0L7QtNC40LwgcmVzaXplINCy0LXQutGC0L7RgNCwINC/0YDQuCDQv9C+0LzQvtGJ0Lgg0LjRgtC10YDQsNGC0L7RgNCwCgljb3V0PDxjLnNpemUoKSsxOwoJcmV0dXJuIDA7Cn0=