import java.util.ArrayList;
public class Main {
public static void main(String[] args) throws Exception{
String aa=“0100110001010001”;
int n=aa.length();
ArrayList al=new ArrayList();
for(int i=1;i<=n;i++) {
for(int j=0;j<=aa.length()-i;j++) {
String x=aa.substring(j,j+i);
if(!al.contains(x)) {
al.add(x);
}
}
}
System.out.println(al.size());
}
}