#include <cctype>
#include <cstdio>
using namespace std;
int main() {
  int counter[25];
  char ch;
  for (int i = 0; i < 25; i++) {
    counter[i] = 0;
  }
  while (scanf("%c", ch) != EOF) {
    counter[ch - 'a']++;
  }
  for (int i = 0; i < 25; i++) {
    printf("%c : %d\\n", i, counter[i]);
  }
}

#include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
  int counter[26];
  char ch;
  for (int i = 0; i < 26; i++) {
    counter[i] = 0;
  }
  while (cin >> ch) {
    if (isalpha(ch)) {
      if (islower(ch))
        counter[ch - 'a']++;
      else
        counter[tolower(ch) - 'a']++;
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", i + 'a', counter[i]);
  }
}


#include <ctype.h>
#include <stdio.h>
int main(void) {
  char x;
  int n[26] = {0}, i = 0;
  scanf("%c", &x);
  while (x != EOF) {
    if (isupper(x))
      x = tolower(x);
    if (('a' <= x) && (x <= 'z'))
      n[x - 'a'] += 1;
    scanf("%c", &x);
  }
  for (i = 0; i < 26; i++)
    printf("%c : %d\\n", i + 'a', n[i]);
  return 0;
}

#include <stdio.h>

int main(void) {
  int charcount[26] = {0}, num;
  char ch;

  while (scanf("%c", &ch) != EOF) {
    if (ch <= 'Z' && ch >= 'A')
      ch += 'a' - 'A';
    if (ch <= 'z' && ch >= 'a')
      charcount[ch - 'a']++;
  }

  for (num = 0; num < 26; num++) {
    printf("%c : %d\\n", 'a' + num, charcount[num]);
  }

  return 0;
}


#include <cctype>
#include <cstdio>
int main() {
  int n[26] = {0};
  char c;
  while (scanf("%c", &c))
    n[(int)tolower(c) - 97]++;
  c = 97;
  for (int i = 0; i < 26; i++)
    printf("%c : %d\\n", c + i, n[i]);
}

#include <cctype>
#include <cstdio>
int main() {
  int n[26] = {0};
  char c;
  while (scanf("%c", &c) != EOF)
    n[(int)tolower(c) - 97]++;
  for (int i = 0; i < 26; i++)
    printf("%c : %d\\n", i + 97, n[i]);
}


#include <cctype>
#include <cstdio>
int main() {
  int n[26] = {0};
  char c;
  while (scanf("%c", &c), c != EOF)
    n[(int)tolower(c) - 97]++;
  c = 97;
  for (int i = 0; i < 26; i++)
    printf("%c : %d\\n", c + i, n[i]);
}

#include <cctype>
#include <cstdio>
int main() {
  int n[26] = {0};
  char c;
  while (scanf("%c", &c) != EOF)
    n[(int)tolower(c) - 97]++;
  c = 97;
  for (int i = 0; i < 26; i++)
    printf("%c : %d\\n", c + i, n[i]);
}


#include <iostream>
#include <string>
using namespace std;

int main() {
  string word;          // string型直接代入できる
  char alp[26] = {0};   // a~z
  int result[26] = {0}; // 0~25
  int n;

  // alpにアルファベット格納する
  for (int i = 97; i <= 122; i++) {
    alp[i - 97] = i;
  }

  while (1) {
    getline(cin, word); // 空白が入ってても1行分読み込める

    // 入力
    for (int i = 0; i < word.length(); i++) {
      if (word[i] >= 'A' && word[i] <= 'Z') {
        n = word[i] - 'A';
        if (n >= 0 && n <= 25)
          result[n]++;
      }
      if (word[i] >= 'a' && word[i] <= 'z') {
        n = word[i] - 'a';
        if (n >= 0 && n <= 25)
          result[n]++;
      }
    }
  }
  // 出力
  for (int k = 0; k < 26; k++) {
    cout << alp[k] << " "
         << ":"
         << " " << result[k] << "\\n";
  }
  return 0;
}

#include <iostream>
#include <string>
using namespace std;

int main() {
  string word;          // string型直接代入できる
  char alp[26] = {0};   // a~z
  int result[26] = {0}; // 0~25
  int n;

  // alpにアルファベット格納する
  for (int i = 97; i <= 122; i++) {
    alp[i - 97] = i;
  }

  while (getline(cin, word)) // getline:空白が入ってても1行分読み込める
  {
    // 入力
    for (int i = 0; i < word.length(); i++) {
      if (word[i] >= 'A' && word[i] <= 'Z') {
        n = word[i] - 'A';
        result[n]++;
      }
      if (word[i] >= 'a' && word[i] <= 'z') {
        n = word[i] - 'a';
        result[n]++;
      }
    }
  }
  // 出力
  for (int k = 0; k < 26; k++) {
    cout << alp[k] << " "
         << ":"
         << " " << result[k] << "\\n";
  }

  return 0;
}


#include <iostream>

using namespace std;

int main() {

  char c;
  int num;
  int cnt[26] = {0};

  while (cin >> c) {

    // if (c == '0') break;

    if ('a' <= c && c <= 'z') {
      num = c - 'a';
      cnt[num]++;
    } else if ('A' <= c && c <= 'Z') {
      num = c - 'A';
      cnt[num]++;
    }
  }

  for (int i = 0; i < 26; i++) {
    char a = i + 'a';
    cout << a << " : " << cnt[i] << endl;
  }

  return 0;
}


#include <iostream>
#include <stdio.h>
#define ALPHABET 26

int main() {
  int n[ALPHABET] = {};
  while (true) {
    char c;
    scanf("%c", &c);
    if ('A' <= c && c <= 'Z') {
      c += 0x20;
    }
    if ('a' <= c && c <= 'z') {
      n[c - 0x61]++;
    }
    if (c == '.') {
      break;
    }
  }
  for (int i = 0; i < ALPHABET; i++) {
    std::cout << char('a' + i) << " : " << n[i] << std::endl;
  }
}

#include <iostream>
#define ALPHABET 26

int main() {
  char c;
  int n[ALPHABET] = {};
  while (std::cin >> c) {
    if ('A' <= c && c <= 'Z') {
      c += 0x20;
    }
    if ('a' <= c && c <= 'z') {
      n[c - 0x61]++;
    }
  }
  for (int i = 0; i < ALPHABET; i++) {
    std::cout << char('a' + i) << " : " << n[i] << std::endl;
  }
}


#include <bits/stdc++.h>
using namespace std;

int main() {
  // map < char , int > count;
  int count[500] = {};
  string str;
  while (cin >> str) {
    for (int i = 0; i < str.size(); i++) {
      if (isupper(str[i]))
        str[i] = tolower(str[i]);
    }
    for (int i = 0; i < str.size(); i++) {
      count[str[i]]++;
    }
  }
  for (char ch = 'a'; ch = 'z'; ch++) {
    cout << ch << " : " << count[ch] << endl;
  }
  return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
  // map < char , int > count;
  int count[500] = {};
  string str;
  while (cin >> str) {
    for (int i = 0; i < str.size(); i++) {
      if (isupper(str[i]))
        str[i] = tolower(str[i]);
    }
    for (int i = 0; i < str.size(); i++) {
      count[str[i]]++;
    }
  }
  for (char ch = 'a'; ch <= 'z'; ch++) {
    cout << ch << " : " << count[ch] << endl;
  }
  return 0;
}


#include <cctype>
#include <stdio.h>
int main() {
  char ch;
  int count[26] = {};
  while ((ch = getchar()) != '\\0') {
    if (isupper(ch))
      ch = tolower(ch);
    if (isalpha(ch))
      count[ch - 'a'] += 1;
  }

  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", i + 'a', count[i]);
  }
}

#include <cctype>
#include <stdio.h>
int main() {
  char ch;
  int count[26] = {};
  while ((ch = getchar()) != EOF) {
    if (isupper(ch))
      ch = tolower(ch);
    if (isalpha(ch))
      count[ch - 'a'] += 1;
  }

  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", i + 'a', count[i]);
  }
}


#include <bits/stdc++.h>
using namespace std;

int main() {
  char ch;

  int cnt[26] = {};
  while (true) {
    cin >> ch;
    if (ch == '.')
      break;
    if ('a' <= ch && ch <= 'z') {
      cnt[ch - 'a']++;
    } else if ('A' <= ch && ch <= 'Z') {
      cnt[ch - 'A']++;
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", 'a' + i, cnt[i]);
  }
}

#include <bits/stdc++.h>
using namespace std;

int main() {
  char ch;
  int cnt[26] = {};
  while (scanf("%c", &ch) != EOF) {
    if ('a' <= ch && ch <= 'z') {
      cnt[ch - 'a']++;
    } else if ('A' <= ch && ch <= 'Z') {
      cnt[ch - 'A']++;
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", 'a' + i, cnt[i]);
  }
}


#include <cstdio>

int main(void) {
  int ch;
  int chCounts[26] = {};
  while (scanf("%d", &ch) != EOF) {
    if ('a' <= ch && ch <= 'z') {
      chCounts[ch - 'a']++;
    } else if ('A' <= ch && ch <= 'Z') {
      chCounts[ch - 'A']++;
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", 'a' + i, chCounts[i]);
  }
  return 0;
}

#include <cstdio>

int main(void) {
  int ch;
  int chCounts[26] = {};
  while ((ch = getchar()) != EOF) {
    if ('a' <= ch && ch <= 'z') {
      chCounts[ch - 'a']++;
    } else if ('A' <= ch && ch <= 'Z') {
      chCounts[ch - 'A']++;
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", 'a' + i, chCounts[i]);
  }
  return 0;
}


#include <cstdio>
#include <iostream>
#include <stdio.h>

int main() {
  char ch;
  int counts[26] = {};
  while (scanf("%c", &ch)) {
    if (ch == EOF) {
      break;
    }
    if ('a' <= ch || 'z' <= ch) {
      counts[ch - 'a']++;
    } else if ('A' <= ch || 'Z' <= ch) {
      counts[ch - 'A']++;
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", 'a' + i, counts[i]);
    counts[i] = 0;
  }
  return 0;
}


#include <ctype.h>
#include <stdio.h>
int main() {
  int s;
  int i = 0;
  int count[26] = {0};
  while ((s = getchar()) != '.' || i < 20) {
    s = tolower(s);
    if (s >= 'a' && s <= 'z')
      count[s - 'a']++;
    i++;
  }
  for (i = 0; i < 26; i++)
    printf("%c : %d\\n", 97 + i, count[i]);
  return 0;
}

#include <ctype.h>
#include <stdio.h>
int main() {
  int s;
  int i = 0;
  int count[26] = {0};
  while (i < 1200) {
    s = getchar();
    s = tolower(s);
    if (s >= 'a' && s <= 'z')
      count[s - 'a']++;
    i++;
  }
  for (i = 0; i < 26; i++)
    printf("%c : %d\\n", 97 + i, count[i]);
  return 0;
}


#include <iostream>
using namespace std;

int main() {
  int alpha[26];
  for (int a = 0; a < 26; a++)
    alpha[a] = 0;

  char ch;
  while (1) {
    cin >> ch;
    if (ch == '.')
      break;

    for (int i = 0; i < 26; i++) {
      if (ch - 'a' == i)
        alpha[i]++;
      else if (ch + 32 - 'a' == i)
        alpha[i]++;
    }
  }

  for (int i = 0; i < 26; i++) {
    cout << (char)(i + 'a') << " : " << alpha[i] << endl;
  }

  return 0;
}

#include <iostream>
using namespace std;

int main() {
  int alpha[26];
  for (int a = 0; a < 26; a++)
    alpha[a] = 0;

  char ch;
  while (cin >> ch) {

    for (int i = 0; i < 26; i++) {
      if (ch - 'a' == i)
        alpha[i]++;
      else if (ch + 32 - 'a' == i)
        alpha[i]++;
    }
  }

  for (int i = 0; i < 26; i++) {
    cout << (char)(i + 'a') << " : " << alpha[i] << endl;
  }

  return 0;
}


#include <cctype>
#include <cstdio>
int main() {
  char ch;
  int counter[] = {0};

  while (scanf("%c", &ch) != EOF) {
    if (isupper(ch)) {
      ch = tolower(ch);
    }
    if (isalpha(ch)) {
      int num = ch - 'a';
      counter[num]++;
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%s : %d", i + 'a', counter[i]);
  }
  return 0;
}

#include <cctype>
#include <cstdio>
int main() {
  char ch;
  int counter[26] = {0};

  while (scanf("%c", &ch) != EOF) {
    if (isupper(ch)) {
      ch = tolower(ch);
    }
    if ('a' <= ch && ch <= 'z') {
      int num = ch - 'a';
      counter[num]++;
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", i + 'a', counter[i]);
  }
  return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main() {
  vector<int> Result(26, 0);

  char a;

  while (scanf("%c", &a)) {
    if (a == EOF) {
      break;
    }
    if (iswalpha(a)) {
      int temp = tolower(a) - 'a';
      Result.at(temp) += 1;
    }
  }

  char c = 'a';
  for (auto b : Result) {
    cout << c << " : " << b << endl;
    c++;
  }
}

#include <iostream>
#include <vector>

using namespace std;

int main() {
  vector<int> Result(26, 0);

  char a;

  while (cin >> a) {
    if (iswalpha(a)) {
      int temp = tolower(a) - 'a';
      Result.at(temp) += 1;
    }
  }

  char c = 'a';
  for (auto b : Result) {
    cout << c << " : " << b << endl;
    c++;
  }
}


#include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;

int main() {
  string s;
  char m;
  vector<char> si;
  getline(cin, s);
  while (s.size() > 0) {
    // si.resize(s.size());
    // for(int i=0;i<s.size();i++){
    //     si[i] = null;
    // }
    int i = 0;
    while (s[i] != '\\0') {
      m = tolower(s[i]);
      if (m >= 'a' && m <= 'z') {
        si.push_back(m);
      }
      i++;
    }
    getline(cin, s);
  }
  sort(si.begin(), si.end());
  // for(int i=0;i<=si.size();i++){
  //     cout << si[i];
  // }
  char moji = 'a';
  int spos = 0;
  int cnt = 0;
  while (moji <= 'z') {
    if (moji == si[spos]) {
      cnt++;
      spos++;
    } else {
      cout << moji << " : " << cnt << endl;
      moji = char(int(moji) + 1);
      cnt = 0;
    }
  }
  return 0;
}

#include <algorithm>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;

int main() {
  string s;
  char m;
  vector<char> si;
  getline(cin, s);
  while (s.size() > 0) {
    // si.resize(s.size());
    // for(int i=0;i<s.size();i++){
    //     si[i] = null;
    // }
    int i = 0;
    while (s[i] != '\\0') {
      m = tolower(s[i]);
      if (m >= 'a' && m <= 'z') {
        si.push_back(m);
      }
      i++;
    }
    getline(cin, s);
  }
  sort(si.begin(), si.end());
  // for(int i=0;i<=si.size();i++){
  //     cout << si[i];
  // }
  char moji = 'a';
  int spos = 0;
  int cnt = 0;
  while (moji <= 'z') {
    if (spos < si.size() && moji == si[spos]) {
      cnt++;
      spos++;
    } else {
      cout << moji << " : " << cnt << endl;
      moji = char(int(moji) + 1);
      cnt = 0;
    }
  }
  return 0;
}


#include <iostream>
#include <string>
using namespace std;

int main() {
  string str;
  int a[26] = {0};
  char c;

  while (1) {
    getline(cin, str);

    int n = 0;

    for (unsigned int i = 0; i < str.size(); i++) {
      if (str[i] >= 'a' && str[i] <= 'z') {
        n = str[i] - 'a';
        a[n]++;
      } else if (str[i] >= 'A' && str[i] <= 'Z') {
        n = str[i] - 'A';
        a[n]++;
      }
    }
    if (str[str.size() - 1] == '.')
      break;
  }

  for (int i = 0; i < 26; i++) {
    c = 'a' + i;
    cout << c << " : " << a[i] << endl;
  }

  return 0;
}

#include <iostream>
#include <string>
using namespace std;

int main() {
  string str;
  int a[26] = {0};
  char c;

  while (cin >> str) {

    int n = 0;

    for (unsigned int i = 0; i < str.size(); i++) {
      if (str[i] >= 'a' && str[i] <= 'z') {
        n = str[i] - 'a';
        a[n]++;
      } else if (str[i] >= 'A' && str[i] <= 'Z') {
        n = str[i] - 'A';
        a[n]++;
      }
    }
  }

  for (int i = 0; i < 26; i++) {
    c = 'a' + i;
    cout << c << " : " << a[i] << endl;
  }

  return 0;
}


#include <iostream>

using namespace std;

int main() {

  char ch, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w,
      x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V,
      W, X, Y, Z, aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, ll, mm, nn, oo,
      pp, qq, rr, ss, tt, uu, vv, ww, xx, yy, zz;
  for (int abc = 0;; abc++) {

    if (ch == '.') {
      break;
    }
    if (ch == a || ch == A) {
      aa += 1;
    } else if (ch == b || ch == B) {
      bb += 1;
    } else if (ch == c || ch == C) {
      cc += 1;
    } else if (ch == d || ch == D) {
      dd += 1;
    } else if (ch == e || ch == E) {
      ee += 1;
    } else if (ch == f || ch == F) {
      ff += 1;
    } else if (ch == g || ch == G) {
      gg += 1;
    } else if (ch == h || ch == H) {
      hh += 1;
    } else if (ch == i || ch == I) {
      ii += 1;
    } else if (ch == j || ch == J) {
      jj += 1;
    } else if (ch == k || ch == K) {
      kk += 1;
    } else if (ch == l || ch == L) {
      ll += 1;
    } else if (ch == m || ch == M) {
      mm += 1;
    } else if (ch == n || ch == N) {
      nn += 1;
    } else if (ch == o || ch == O) {
      oo += 1;
    } else if (ch == p || ch == P) {
      pp += 1;
    } else if (ch == q || ch == Q) {
      qq += 1;
    } else if (ch == r || ch == R) {
      rr += 1;
    } else if (ch == s || ch == S) {
      ss += 1;
    } else if (ch == t || ch == T) {
      tt += 1;
    } else if (ch == u || ch == U) {
      uu += 1;
    } else if (ch == v || ch == V) {
      vv += 1;
    } else if (ch == w || ch == W) {
      ww += 1;
    } else if (ch == x || ch == X) {
      xx += 1;
    } else if (ch == y || ch == Y) {
      yy += 1;
    } else if (ch == z || ch == Z) {
      zz += 1;
    }
  }
  cout << 'a' << " " << ':' << " " << aa << endl;
  cout << 'b' << " " << ':' << " " << bb << endl;
  cout << 'c' << " " << ':' << " " << cc << endl;
  cout << 'd' << " " << ':' << " " << dd << endl;
  cout << 'e' << " " << ':' << " " << ee << endl;
  cout << 'f' << " " << ':' << " " << ff << endl;
  cout << 'g' << " " << ':' << " " << gg << endl;
  cout << 'h' << " " << ':' << " " << hh << endl;
  cout << 'i' << " " << ':' << " " << ii << endl;
  cout << 'j' << " " << ':' << " " << jj << endl;
  cout << 'k' << " " << ':' << " " << kk << endl;
  cout << 'l' << " " << ':' << " " << ll << endl;
  cout << 'm' << " " << ':' << " " << mm << endl;
  cout << 'n' << " " << ':' << " " << nn << endl;
  cout << 'o' << " " << ':' << " " << oo << endl;
  cout << 'p' << " " << ':' << " " << pp << endl;
  cout << 'q' << " " << ':' << " " << qq << endl;
  cout << 'r' << " " << ':' << " " << rr << endl;
  cout << 's' << " " << ':' << " " << ss << endl;
  cout << 't' << " " << ':' << " " << tt << endl;
  cout << 'u' << " " << ':' << " " << uu << endl;
  cout << 'v' << " " << ':' << " " << vv << endl;
  cout << 'w' << " " << ':' << " " << ww << endl;
  cout << 'x' << " " << ':' << " " << xx << endl;
  cout << 'y' << " " << ':' << " " << yy << endl;
  cout << 'z' << " " << ':' << " " << zz << endl;
}

#include <iostream>
using namespace std;
int main() {
  char c;
  int count[26] = {0}, a, i;
  while (cin >> c) {
    a = c - 'a';
    if (a < 0) {
      a += 32;
    }
    count[a]++;
  }
  for (i = 0; i < 26; i++) {
    cout << (char)(i + 'a') << " : " << count[i] << endl;
  }
  return 0;
}


#include <iostream>
#include <string>
using namespace std;

int main() {
  string x;
  int a;
  while (1) {
    cin >> x;
    if (x == "0")
      break;
    a = 0;
    for (int i = 0; i < x.length(); i++)
      a += x[i] - '0';
    cout << a << endl;
  }
}

#include <iostream>
#include <string>
using namespace std;

int main() {
  string str;
  int alp[26];
  char c;
  int x;
  for (int i = 0; i < 26; i++)
    alp[i] = 0;
  while (cin >> str) {
    for (unsigned i = 0; i < str.length(); i++) {
      str[i] = tolower(str[i]);
      if (str[i] >= 'a' && str[i] <= 'z') {
        x = str[i] - 'a';
        alp[x]++;
      }
    }
  }
  for (int i = 0; i < 26; i++) {
    c = 'a' + i;
    cout << c << " : " << alp[i] << endl;
  }
  return 0;
}


#include <iostream>
#include <string>
using namespace std;

int main() {
  string buf;

  while (true) {
    getline(cin, buf);

    int cnt[26] = {0};
    int idx = 0;

    for (int i = 0; i < buf.size(); i++) {
      char ch = buf[i];

      if (ch >= 65 and ch <= 90) {
        idx = ch - 65;
        cnt[idx] += 1;
      }
      if (ch >= 97 and ch <= 122) {
        idx = ch - 97;
        cnt[idx] += 1;
      }
    }

    for (int i = 0; i < 26; i++) {
      cout << (char)(i + 97) << " : " << cnt[i] << endl;
    }
  }
  return 0;
}

#include <iostream>
#include <string>
using namespace std;

int main() {
  string buf;

  int cnt[26] = {0};
  int idx = 0;

  while (cin >> buf) {
    for (int i = 0; i < buf.size(); i++) {
      char ch = buf[i];

      if (ch >= 65 and ch <= 90) {
        idx = ch - 65;
        cnt[idx] += 1;
      }
      if (ch >= 97 and ch <= 122) {
        idx = ch - 97;
        cnt[idx] += 1;
      }
    }
  }

  for (int i = 0; i < 26; i++) {
    cout << (char)(i + 97) << " : " << cnt[i] << endl;
  }
  return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  int co[40] = {};
  int i, j;
  char al[40] = "abcdefghijklmnopqrstuvwxyz";
  char ch;
  while (true) {
    scanf("%c", 'ch');
    if (ch = '.')
      break;
    for (i = 0; i < 26; i++) {
      if (ch == al[i]) {
        co[i] += 1;
      }
    }
  }
  for (j = 0; j < 26; j++) {
    cout << al[j] << " : " << co[j] << endl;
  }
  return 0;
}

#include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  int co[40] = {};
  int i, j;
  char al[40] = "abcdefghijklmnopqrstuvwxyz";
  char ch;
  while (scanf("%c", &ch) != EOF) {
    if (isupper(ch)) {
      ch = tolower(ch);
    }
    for (i = 0; i < 26; i++) {
      if (ch == al[i]) {
        co[i] += 1;
      }
    }
  }
  for (j = 0; j < 26; j++) {
    cout << al[j] << " : " << co[j] << endl;
  }
  return 0;
}


#include <iostream>
#include <string>
using namespace std;

int main() {
  string str;
  string temp;
  string::size_type index;
  int count = 0;
  int i = 0;

  while (std::cin >> temp) {
    str += temp;
  }
  char c = 'a' + i;
  while (c != 'z' + 1) {
    count = 0;
    for (string::iterator it = str.begin(); it != str.end(); it++) {
      if (c == *it) {
        count++;
      } else if (c - 32 == *it) {
        count++;
      }
    }
    cout << c << " : " << count << endl;
    i++;
  }

  return 0;
}

#include <iostream>
#include <string>
using namespace std;

int main() {
  string str;
  string temp;
  string::size_type index;
  int count = 0;
  int i = 0;

  while (std::cin >> temp) {
    str += temp;
  }
  char c = 'a';
  while (c != 'z' + 1) {

    count = 0;
    for (string::iterator it = str.begin(); it != str.end(); it++) {
      if (c == *it) {
        count++;
      } else if (c - 32 == *it) {
        count++;
      }
    }
    cout << c << " : " << count << endl;
    c += 1;
  }

  return 0;
}


#include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
  string AtoZ;
  char atoz[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                   'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                   's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
  int a[26] = {};
  while (0) {
    cin >> AtoZ;
    for (int i = 1; i <= AtoZ.size(); i++) {
      if (isupper(AtoZ[i]) == 1) {
        a[i] = tolower(a[i]);
      }
      for (int j = 1; j <= 26; i++) {
        if (AtoZ[i] == atoz[j]) {
          a[j]++;
          break;
        }
      }
    }
  }
  for (int k = 1; k <= 26; k++) {
    cout << atoz[k] << " : " << a[k] << endl;
  }
  return 0;
}

#include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
  string AtoZ;
  char atoz[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                   'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                   's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
  int a[26] = {0};
  while (cin >> AtoZ) {
    for (int i = 0; i < AtoZ.size(); i++) {
      if (isupper(AtoZ[i])) {
        AtoZ[i] = tolower(AtoZ[i]);
      }
      for (int j = 0; j < 26; j++) {
        if (AtoZ[i] == atoz[j]) {
          a[j]++;
          break;
        }
      }
    }
  }
  for (int k = 0; k < 26; k++) {
    cout << atoz[k] << " : " << a[k] << endl;
  }
  return 0;
}


#include <iostream>
int main() {
  int cnt[26];
  for (int i = 0; i < 26; i++)
    cnt[i] = 0;
  while (true) {
    char c;
    std::cin >> c;
    if ('A' <= c && c <= 'Z') {
      cnt[c - 'A']++;
    } else if ('a' <= c && c <= 'z') {
      cnt[c - 'a']++;
    } else if (c == '.') {
      break;
    }
  }
  for (int i = 0; i < 26; i++) {
    std::cout << (char)(i + 'a') << " : " << cnt[i] << std::endl;
  }
  return 0;
}

#include <iostream>
int main() {
  int cnt[26];
  for (int i = 0; i < 26; i++)
    cnt[i] = 0;
  while (true) {
    char c;
    std::cin >> c;
    if (std::cin.eof()) {
      break;
    } else if ('A' <= c && c <= 'Z') {
      cnt[c - 'A']++;
    } else if ('a' <= c && c <= 'z') {
      cnt[c - 'a']++;
    }
  }
  for (int i = 0; i < 26; i++) {
    std::cout << (char)(i + 'a') << " : " << cnt[i] << std::endl;
  }
  return 0;
}


#include <ctype.h>
#include <stdio.h>
#define CHARNUM 26

char c_set[CHARNUM] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                       'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                       's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};

int ctoi(char c) {
  int i = 0;
  while (c != c_set[i] && i < CHARNUM) {
    i++;
  }
  return i;
}

int main() {
  char c;
  int v[CHARNUM + 1] = {0};
  while ((c = getchar()) != '\\n') {
    ungetc(c, stdin);
    while (1) {
      c = tolower(getchar());
      if (c == '\\n')
        break;
      v[ctoi(c)]++;
    }
  }

  for (int i = 0; i < CHARNUM; i++) {
    printf("%c : %d\\n", c_set[i], v[i]);
  }
}

#include <ctype.h>
#include <stdio.h>
#define CHARNUM 26

char c_set[CHARNUM] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
                       'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
                       's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};

int ctoi(char c) {
  int i = 0;
  while (c != c_set[i] && i < CHARNUM) {
    i++;
  }
  return i;
}

int main() {
  char c;
  int v[CHARNUM + 1] = {0};
  while ((c = getchar()) != EOF) {
    ungetc(c, stdin);
    while (1) {
      c = tolower(getchar());
      if (c == '\\n')
        break;
      v[ctoi(c)]++;
    }
  }

  for (int i = 0; i < CHARNUM; i++) {
    printf("%c : %d\\n", c_set[i], v[i]);
  }
}


#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  char alpha[10000];
  int count[26] = {0};
  int num = 0;

  cin.getline(alpha, sizeof(alpha));
  while (1) {
    for (int i = 0; alpha[i] != NULL; i++) {
      if (alpha[i] >= 97) {
        num = alpha[i] - 'a';
      } else {
        num = alpha[i] - 'A';
      }
      count[num]++;
    }
    for (int i = 97; i < 123; i++) {
      cout << (char)i << " : " << count[i - 97] << endl;
    }
    cin.getline(alpha, sizeof(alpha));
    if (alpha[0] == EOF)
      break;
  }
}

#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  char alpha[10000];
  int count[26] = {0};
  int num = 0;

  cin.getline(alpha, sizeof(alpha));
  while (1) {
    for (int i = 0; alpha[i] != NULL; i++) {
      if (alpha[i] >= 97) {
        num = alpha[i] - 'a';
      } else {
        num = alpha[i] - 'A';
      }
      count[num]++;
    }

    cin.getline(alpha, sizeof(alpha));
    if (alpha[0] == NULL)
      break;
  }
  for (int i = 97; i < 123; i++) {
    cout << (char)i << " : " << count[i - 97] << endl;
  }
}


#include <iostream>
#include <stdio.h>
#include <string>

int alph[26];
int p;

void Check(char _moji) {
  p = 0;
  if (isupper(_moji))
    _moji = tolower(_moji);
  for (char ch = 'a'; ch <= 'z'; ch++) {
    if (ch == _moji) {
      alph[p] += 1;
      break;
    }
    p++;
  }
}
void Show() {
  p = 0;
  for (char ch = 'a'; ch <= 'z'; ch++) {
    printf("%c : %d\\n", ch, alph[p]);
    p++;
  }
}
int main() {
  char moji;
  while (1) {
    scanf("%c", &moji);
    Check(moji);
    if (moji == EOF) {
      Show();
      break;
    }
  }
  return 0;
}

#include <iostream>
#include <stdio.h>
#include <string>

int alph[26];
int p;

void Check(char _moji) {
  p = 0;
  if (isupper(_moji))
    _moji = tolower(_moji);
  for (char ch = 'a'; ch <= 'z'; ch++) {
    if (ch == _moji) {
      alph[p] += 1;
      break;
    }
    p++;
  }
}
void Show() {
  p = 0;
  for (char ch = 'a'; ch <= 'z'; ch++) {
    printf("%c : %d\\n", ch, alph[p]);
    p++;
  }
}
int main() {
  char moji;
  while (scanf("%c", &moji) != EOF) {
    Check(moji);
  }
  Show();
  return 0;
}


#include <bits/stdc++.h>
using namespace std;

int main() {
  char c;
  int nI[27] = {0};
  while (cin >> c, c != '.') {
    int nA = 0, na = 0;
    nA = c - '@';
    na = c - '`';
    if (na > 0 && nA > 0) {
      nI[na] += 1;
    } else {
      nI[nA] += 1;
    }
  }
  for (int i = 1; i < 27; i++) {
    printf("%c : %d\\n", '`' + i, nI[i]);
  }
  return 0;
}

#include <iostream>
#include <string>
using namespace std;

int main() {
  char c;
  int nI[27] = {0};
  while (cin >> c) {
    int n = tolower(c);
    nI[n - '`'] += 1;
  }
  for (int i = 1; i < 27; i++) {
    printf("%c : %d\\n", '`' + i, nI[i]);
  }
  // system("pause");
  return 0;
}


#include <iostream>
#include <string>

using namespace std;

int main() {
  string a, e;
  int i, d[26];
  for (i = 0; i < 26; i++) {
    d[i] = 0;
  }
  char b;
  while (1) {
    getline(cin, e);
    a += e;
    if (e.substr(1, 1) == "") {
      break;
    }
  }
  string::iterator s;
  for (s = a.begin(); s != a.end(); s++) {
    *s = tolower(*s);
  }
  for (i = 0; i < 26; i++) {
    for (s = a.begin(); s != a.end(); s++) {
      b = 97 + i;
      if (*s == b) {
        d[i] += 1;
      }
    }
  }
  for (i = 0; i < 26; i++) {
    b = 97 + i;
    cout << b << " : " << d[i] << endl;
  }
  return 0;
}

#include <iostream>
#include <string>

using namespace std;

int main() {
  string a, e;
  int i, d[26];
  for (i = 0; i < 26; i++) {
    d[i] = 0;
  }
  char b;
  while (1) {
    getline(cin, e);
    a += e;
    if (e == "") {
      break;
    }
  }
  string::iterator s;
  for (s = a.begin(); s != a.end(); s++) {
    *s = tolower(*s);
  }
  for (i = 0; i < 26; i++) {
    for (s = a.begin(); s != a.end(); s++) {
      b = 97 + i;
      if (*s == b) {
        d[i] += 1;
      }
    }
  }
  for (i = 0; i < 26; i++) {
    b = 97 + i;
    cout << b << " : " << d[i] << endl;
  }
  return 0;
}

terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr: __pos (which is 1) > this->size() (which is 0)


#include <iostream>
#include <map>
#include <string.h>
#include <vector>

using namespace std;

int main() {

  map<char, int> ans;
  string str;

  while (true) {
    cin >> str;
    for (int i = 0; i < str.size(); ++i) {
      ++ans[str[i]];
    }
    if (str.find(".") != string::npos && str.find("Mr.") == string::npos) {
      break;
    }
  }

  char a;
  map<char, int>::iterator itr1, itr2;
  for (int i = 0; i < 26; ++i) {
    itr1 = ans.find('a' + i);
    itr2 = ans.find('A' + i);
    a = 'a' + i;
    cout << a << " : " << itr1->second + itr2->second << endl;
  }
  return 0;
}

#include <iostream>
#include <map>
#include <string.h>
#include <vector>

using namespace std;

int main() {

  map<char, int> ans;
  string str;

  while (cin >> str) {
    for (int i = 0; i < str.size(); ++i) {
      ++ans[str[i]];
    }
  }

  char a;
  map<char, int>::iterator itr1, itr2;
  for (int i = 0; i < 26; ++i) {
    itr1 = ans.find('a' + i);
    itr2 = ans.find('A' + i);
    a = 'a' + i;
    cout << a << " : " << itr1->second + itr2->second << endl;
  }
  return 0;
}


#include <cstdio>
#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main() {
  vector<string> s;
  string temps;
  do {
    getline(cin, temps);
    s.push_back(temps);
  } while (temps[temps.length() - 1] != '.');
  int cnt[26] = {};
  for (vector<string>::iterator i = s.begin(); i != s.end(); i++) {
    for (int j = 0; j < i->length(); j++) {
      if ((*i)[j] >= 'a' && (*i)[j] <= 'z') {
        (*i)[j] += 'A' - 'a';
      }
      if ((*i)[j] >= 'A' && (*i)[j] <= 'Z') {
        cnt[(int)((*i)[j] - 'A')]++;
      }
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", i + 'a', cnt[i]);
  }
  return 0;
}

#include <cstdio>
#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main() {
  vector<string> s;
  string temps;
  while (cin >> temps) {
    s.push_back(temps);
  }
  int cnt[26] = {};
  for (vector<string>::iterator i = s.begin(); i != s.end(); i++) {
    for (int j = 0; j < i->length(); j++) {
      if ((*i)[j] >= 'a' && (*i)[j] <= 'z') {
        (*i)[j] += 'A' - 'a';
      }
      if ((*i)[j] >= 'A' && (*i)[j] <= 'Z') {
        cnt[(int)((*i)[j] - 'A')]++;
      }
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", i + 'a', cnt[i]);
  }
  return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;

int count[26];

int main() {
  char c;
  while (1) {
    scanf("%c", &c);
    if (c == '.')
      break;
    if (c < 'a')
      c += 32;
    if (c == ' ')
      continue;
    count[c - 'a']++;
  }
  for (int i = 0; i < 26; i++) {
    c = 'a' + i;
    cout << c << " : " << count[i] << endl;
  }
  return 0;
}

#include <cstdio>
#include <iostream>
using namespace std;

int count[26];

int main() {
  char c;
  while (1) {
    cin >> c;
    if (cin.eof())
      break;
    if (c < 'a')
      c += 32;
    if (c < 'a' || c > 'z')
      continue;
    count[c - 'a']++;
  }
  for (int i = 0; i < 26; i++) {
    c = 'a' + i;
    cout << c << " : " << count[i] << endl;
  }
  return 0;
}


#include <stdio.h>
int main(void) {
  // Here your code !
  char chara[1200];
  int count[26];
  int i = 0;
  // 初期化
  for (int i = 0; i < 26; i++)
    count[i] = 0;
  // コンソール読み込み
  fgets(chara, sizeof(chara), stdin);
  fputs(chara, stdout);
  for (i = 0; i < sizeof(chara); i++) {
    int ch = chara[i];
    if (ch < 65 || ch > 122)
      continue;
    if (ch >= 97 && ch <= 122)
      ch = ch - 32; // 小文字を大文字に
    count[ch - 65] += 1;
  }
  for (int i = 0; i < sizeof(count) / 4; i++) {
    printf("%c : %d\\n", 65 + i, count[i]);
  }
  getchar();
  return 0;
}

#include <stdio.h>
int main(void) {
  char chara[1200]; // 文字列
  int count[26];    // 文字のカウント配列
  // 初期化
  for (int i = 0; i < 1200; i++)
    chara[i] = 0;
  for (int i = 0; i < 26; i++)
    count[i] = 0;
  // コンソール読み込み
  while (fgets(chara, sizeof(chara), stdin) != NULL) {
    for (int i = 0; i < sizeof(chara); i++) {
      int ch = chara[i];
      if (ch < 65 || ch > 122)
        continue;
      if (ch >= 97 && ch <= 122)
        ch = ch - 32; // 小文字を大文字に
      count[ch - 65] += 1;
    }
    for (int i = 0; i < 1200; i++)
      chara[i] = 0; // 初期化
  }
  for (int i = 0; i < sizeof(count) / 4; i++) {
    printf("%c : %d\\n", 97 + i, count[i]);
  }
  return 0;
}


#include <cctype>
#include <iostream>

using namespace std;

int main() {
  char ch;

  while (1) {
    cin >> ch;

    if (ch != '\\n') {
      if (ch >= 'A' && ch <= 'Z') {
        cout << tolower(ch);
      } else if (ch >= 'a' && ch <= 'z') {
        cout << toupper(ch);
      } else {
        cout << ch;
      }
    } else {
      cout << endl;
      break;
    }
  }

  return (0);
}

#include <cctype>
#include <iostream>

#define MAX_LEN (1200)

using namespace std;

int main() {
  char *str = new char[MAX_LEN + 1];
  int *counter = new int[26];

  for (int i = 0; i < 26; i++) {
    counter[i] = 0;
  }

  while (cin >> str) {
    for (int i = 0; str[i] != '\\0'; i++) {
      if (str[i] >= 'A' && str[i] <= 'Z') {
        str[i] = tolower(str[i]);
      }

      if (str[i] >= 'a' && str[i] <= 'z') {
        int num = str[i] - 'a';
        counter[num]++;
      }
    }
  }

  for (int i = 0; i < 26; i++) {
    cout << (char)('a' + i) << " : " << counter[i] << endl;
  }

  delete[] str;
  delete[] counter;

  return (0);
}


#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  unordered_multiset<string> parts;
  vector<string> alphabet;
  for (int i = 97; i < 123; i++) {
    alphabet.push_back(string(1, (char)i));
  }
  while (1) {
    string word;
    cin >> word;
    for (auto var : word) {
      parts.insert(string(1, tolower(var)));
    }
    if (*(word.end() - 1) == '.')
      break;
  }
  for (auto var : alphabet) {
    cout << var << " : " << parts.count(var) << endl;
  }

  return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  unordered_multiset<string> parts;
  vector<string> alphabet;
  for (int i = 97; i < 123; i++) {
    alphabet.push_back(string(1, (char)i));
  }

  char tmpc;
  while (cin >> tmpc) {
    parts.insert(string(1, tolower(tmpc)));
  }
  for (auto var : alphabet) {
    cout << var << " : " << parts.count(var) << endl;
  }

  return 0;
}


#include <cstdio>
#include <string.h>

int main() {

  int eachalphabetnum[26];

  char s[1200];

  while (scanf("%[^\\n]", s) != EOF) {

    for (int i = 0; i < 26; i++) {
      eachalphabetnum[i] = 0;
    }

    for (int i = 0; s[i] != '\\0'; i++) {

      char c = s[i];

      if (c >= 65 && c <= 90) {
        eachalphabetnum[c - 65]++;
      } else if (c >= 97 && c <= 122) {
        eachalphabetnum[c - 97]++;
      }
    }
  }

  for (int i = 0; i < 26; i++) {
    char d = i + 97;
    std::printf("%c : %d\\n", d, eachalphabetnum[i]);
  }
}

#include <cstdio>
#include <string.h>

int main() {

  int eachalphabetnum[26];

  for (int i = 0; i < 26; i++) {
    eachalphabetnum[i] = 0;
  }

  char s[1200];

  while (scanf("%s", s) != EOF) {

    for (int i = 0; s[i] != '\\0'; i++) {

      char c = s[i];

      if (c >= 65 && c <= 90) {
        eachalphabetnum[c - 65]++;
      } else if (c >= 97 && c <= 122) {
        eachalphabetnum[c - 97]++;
      }
    }
  }

  for (int i = 0; i < 26; i++) {
    char d = i + 97;
    std::printf("%c : %d\\n", d, eachalphabetnum[i]);
  }
}


#include <iostream>
#include <string>

using namespace std;

int counter[26];

int main() {
  bool end = false;
  while (!end) {
    string str;
    getline(cin, str);
    for (int i = 0; i < str.size(); i++) {
      char charactor = str.at(i);
      if ('A' <= charactor && charactor <= 'Z')
        charactor += 32;
      if ('a' <= charactor && charactor <= 'z')
        counter[charactor - 'a']++;
    }
    if (str.at(str.size() - 1) == '.')
      end = true;
    str = "";
  }
  for (int i = 0; i < 26; i++)
    cout << (char)(i + 'a') << " : " << counter[i] << endl;
  return 0;
}

#include <iostream>
#include <string>

using namespace std;

int counter[26];

int main() {
  bool end = false;
  while (!end) {
    string str;
    getline(cin, str);
    if (str.size() == 0)
      break;
    for (int i = 0; i < str.size(); i++) {
      char charactor = str.at(i);
      if ('A' <= charactor && charactor <= 'Z')
        charactor += 32;
      if ('a' <= charactor && charactor <= 'z')
        counter[charactor - 'a']++;
    }
    str = "";
  }
  for (int i = 0; i < 26; i++)
    cout << (char)(i + 'a') << " : " << counter[i] << endl;
  return 0;
}


#include <iostream>
#include <stdlib.h>
using namespace std;

int main() {
  string str;
  int num[26] = {0};
  bool EoS = false;

  while (1) {
    getline(cin, str);

    for (int i = 0; i < str.size(); i++) {
      if (islower(str[i])) {
        num[str[i] - 'a']++;
      } else if (isupper(str[i])) {
        num[str[i] - 'A']++;
      } else if (str[i] == '.') {
        EoS = true;
      }
    }

    if (EoS) {
      for (int i = 0; i < 26; i++) {
        char c = 'a' + i;
        cout << c << " : " << num[i] << endl;
      }
      break;
    }
  }

  return (0);
}

#include <iostream>
#include <stdlib.h>
using namespace std;

int main() {
  string str;
  int num[26] = {0};

  char ch;
  while (cin >> ch) {

    if (islower(ch)) {
      num[ch - 'a']++;
    } else if (isupper(ch)) {
      num[ch - 'A']++;
    }
  }

  for (int i = 0; i < 26; i++) {
    char c = 'a' + i;
    cout << c << " : " << num[i] << endl;
  }

  return (0);
}


#include <cstring>
#include <iostream>
using namespace std;

int main() {
  int counter[26];
  char ch;

  while (cin >> ch) {
    int num = ch - 'a';
    if (0 <= num && num <= 26) {
      counter[num]++;
    }
  }

  for (int i = 0; i <= 26; i++) {
    char al = i + 'a';
    cout << al << ":" << counter[i] << endl;
  }

  return 0;
}

#include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;

int main() {
  int counter[26] = {};
  char ch;

  for (; cin >> ch;) {

    int num = tolower(ch) - 'a';
    if (0 <= num && num <= 25) {
      counter[num] += 1;
    }
  }

  for (int i = 0; i <= 25; i++) {
    char al = i + 'a';
    cout << al << " : " << counter[i] << endl;
  }

  return 0;
}


#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>

std::string changeString(std::string s);
std::vector<int> count(std::string s, std::vector<int> v);
void print(std::vector<int> v);

int main(void) {
  std::string s;
  std::vector<int> v(26, 0);

  while (std::getline(std::cin, s)) {
    int len = (int)(s.length());
    s = changeString(s);
    v = count(s, v);
  }
  print(v);
  return EXIT_SUCCESS;
}

std::string changeString(std::string s) {
  int len = (int)(s.length());
  for (int i = 0; i < len; i++) {
    int diff = int('a') - int('A');
    if ((int)(s[i]) >= int('A') && (int)(s[i]) <= int('Z')) {
      s[i] += diff;
    }
  }
  return s;
}

std::vector<int> count(std::string s, std::vector<int> v) {
  int len = (int)(s.length());
  for (int i = 0; i < len; i++) {
    v[(int)(s[i]) - (int)('a')]++;
  }
  return v;
}

void print(std::vector<int> v) {
  int size = (int)(v.size());
  for (int i = 0; i < size; i++) {
    char word = (char)((int)('a') + i);
    std::cout << word << " : " << v[i] << std::endl;
  }
}

#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>

std::vector<int> count(std::string s, std::vector<int> v);
void print(std::vector<int> v);

int main(void) {
  std::string s;
  std::vector<int> v(26, 0);

  while (std::getline(std::cin, s)) {
    int len = (int)(s.length());
    v = count(s, v);
  }
  print(v);
  return EXIT_SUCCESS;
}

std::vector<int> count(std::string s, std::vector<int> v) {
  int len = (int)(s.length());
  int diff = int('a') - int('A');
  for (int i = 0; i < len; i++) {
    if ((int)(s[i]) >= int('A') && (int)(s[i]) <= int('Z')) {
      s[i] += diff;
    }
    if ((int)(s[i]) >= int('a') && (int)(s[i]) <= int('z')) {
      v[(int)(s[i]) - (int)('a')]++;
    }
  }
  return v;
}

void print(std::vector<int> v) {
  int size = (int)(v.size());
  for (int i = 0; i < size; i++) {
    char word = (char)((int)('a') + i);
    std::cout << word << " : " << v[i] << std::endl;
  }
}


#include <cctype>
#include <iostream>

#define A_NUM 26
using namespace std;

int main(void) {

  char c;
  int alpha[A_NUM];

  while (1) {
    cin >> c;
    if (c == '\\n')
      break;
    if (isalpha(c)) {
      if (isupper(c))
        c = tolower(c);
      alpha[c - 'a']++;
    }
  }

  for (int i = 0; i < A_NUM; i++) {
    cout << (char)('a' + i) << " : " << alpha[i] << "\\n";
  }
}

#include <cctype>
#include <cstdio>

#define A_NUM 26
using namespace std;

int main(void) {

  char ch;
  int alpha[A_NUM] = {};

  while (scanf("%c", &ch) != EOF) {
    if (isalpha(ch)) {
      if (isupper(ch))
        ch = tolower(ch);
      alpha[(int)(ch - 'a')]++;
    }
  }

  for (int i = 0; i < A_NUM; i++) {
    printf("%c : %d\\n", (char)(i + 'a'), alpha[i]);
  }

  return 0;
}


#include <iostream>
#include <stdio.h>
int main() {
  char ch;
  int num[26] = {}, b, k;
  while (scanf("%c", &ch) != EOF) {
    if ('A' <= ch && ch <= 'Z') {
      k = ch + '32';
      b = k - 'a';
      num[b] += 1;
    } else if ('a' <= ch && ch <= 'z') {
      b = ch - 'a';
      num[b] += 1;
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", i + 'a', num[i]);
  }
}

#include <cctype>
#include <cstdio>

int main() {
  int i = 0, a[26] = {0};
  char ch;

  while (scanf("%c", &ch) != EOF) {
    if (isupper(ch))
      ch = tolower(ch);

    if ('a' <= ch && ch <= 'z')
      ++a[ch - 'a'];

    ++i;
  }

  for (int x = 0; x < 26; ++x)
    printf("%c : %d\\n", 'a' + x, a[x]);

  return 0;
}


#include <iostream>
#include <stdio.h>
using namespace std;

static const int ALPHABETS = 26;

int main(void) {
  int alp[ALPHABETS] = {0};
  int c;

  do {
    c = getchar();
    if ('a' <= c && c <= 'z')
      alp[c - 'a']++;
    if ('A' <= c && c <= 'Z')
      alp[c - 'A']++;
  } while (c != '.');

  for (int i = 0; i < ALPHABETS; i++)
    cout << (char)('a' + i) << " : " << alp[i] << endl;

  return 0;
}

#include <iostream>
#include <stdio.h>
using namespace std;

static const int ALPHABETS = 26;

int main(void) {
  int alp[ALPHABETS] = {0};
  int c;

  while ((c = getchar()) != EOF) {
    if ('a' <= c && c <= 'z')
      alp[c - 'a']++;
    if ('A' <= c && c <= 'Z')
      alp[c - 'A']++;
  }

  for (int i = 0; i < ALPHABETS; i++)
    cout << (char)('a' + i) << " : " << alp[i] << endl;

  return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main() {
  string ch;
  int result[25] = {0};
  cin >> ch;
  for (int i = 0; i < ch.size(); i++) {
    if (isalpha(ch[i])) {
      result[ch[i] - 'a']++;
    }
  }
  for (int i = 0; i < 26; i++) {
    cout << (char)('a' + i) << " : " << result[i] << endl;
  }
}

#include <bits/stdc++.h>
using namespace std;
int main() {
  string ch;
  int result[26] = {0};
  while (getline(cin, ch)) {
    for (int i = 0; i < ch.size(); i++) {
      if (isalpha(ch[i])) {
        ch[i] = tolower(ch[i]);
        result[ch[i] - 'a']++;
      }
    }
  }
  for (int i = 0; i < 26; i++) {
    cout << (char)('a' + i) << " : " << result[i] << endl;
  }
}


#include <cctype>
#include <iostream>
using namespace std;

int main() {
  char ch;
  int count[26] = {0};
  int i;

  while (1) {
    cin >> ch;
    if (isalpha(ch) != 0) {
      count[tolower(ch) - 'a']++;
    }
  }
  for (i = 0; i < 26; i++) {
    cout << (char)(i + 'a') << " : " << count[i] << endl;
  }
  return 0;
}

#include <cctype>
#include <iostream>
using namespace std;

int main() {
  char ch;
  int count[26] = {0};
  int i;

  while (cin >> ch) {
    if (isalpha(ch) != 0) {
      count[tolower(ch) - 'a']++;
    }
  }
  for (i = 0; i < 26; i++) {
    cout << (char)(i + 'a') << " : " << count[i] << endl;
  }
  return 0;
}


#include <cctype>
#include <cstdio>
using namespace std;

int main() {
  char ch;
  int counter[26];

  while (1) {
    scanf("%s", &ch);
    ch == tolower(ch);
    if (isalpha(ch))
      counter[ch - 'a']++;
  }

  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", i + 'a', counter[i]);
  }

  return 0;
}

#include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
#define N 1200
using namespace std;

int main() {
  char ch;
  int count[N];

  for (int i = 0; i < 26; i++) {
    count[i] = 0;
  }

  while (cin >> ch) {
    // cin >> ch;
    ch = tolower(ch);
    // if (ch == '.') break;
    if (ch == 'a')
      count[0] += 1;
    else if (ch == 'b')
      count[1] += 1;
    else if (ch == 'c')
      count[2] += 1;
    else if (ch == 'd')
      count[3] += 1;
    else if (ch == 'e')
      count[4] += 1;
    else if (ch == 'f')
      count[5] += 1;
    else if (ch == 'g')
      count[6] += 1;
    else if (ch == 'h')
      count[7] += 1;
    else if (ch == 'i')
      count[8] += 1;
    else if (ch == 'j')
      count[9] += 1;
    else if (ch == 'k')
      count[10] += 1;
    else if (ch == 'l')
      count[11] += 1;
    else if (ch == 'm')
      count[12] += 1;
    else if (ch == 'n')
      count[13] += 1;
    else if (ch == 'o')
      count[14] += 1;
    else if (ch == 'p')
      count[15] += 1;
    else if (ch == 'q')
      count[16] += 1;
    else if (ch == 'r')
      count[17] += 1;
    else if (ch == 's')
      count[18] += 1;
    else if (ch == 't')
      count[19] += 1;
    else if (ch == 'u')
      count[20] += 1;
    else if (ch == 'v')
      count[21] += 1;
    else if (ch == 'w')
      count[22] += 1;
    else if (ch == 'x')
      count[23] += 1;
    else if (ch == 'y')
      count[24] += 1;
    else if (ch == 'z')
      count[25] += 1;
  }

  cout << "a : " << count[0] << endl;
  cout << "b : " << count[1] << endl;
  cout << "c : " << count[2] << endl;
  cout << "d : " << count[3] << endl;
  cout << "e : " << count[4] << endl;
  cout << "f : " << count[5] << endl;
  cout << "g : " << count[6] << endl;
  cout << "h : " << count[7] << endl;
  cout << "i : " << count[8] << endl;
  cout << "j : " << count[9] << endl;
  cout << "k : " << count[10] << endl;
  cout << "l : " << count[11] << endl;
  cout << "m : " << count[12] << endl;
  cout << "n : " << count[13] << endl;
  cout << "o : " << count[14] << endl;
  cout << "p : " << count[15] << endl;
  cout << "q : " << count[16] << endl;
  cout << "r : " << count[17] << endl;
  cout << "s : " << count[18] << endl;
  cout << "t : " << count[19] << endl;
  cout << "u : " << count[20] << endl;
  cout << "v : " << count[21] << endl;
  cout << "w : " << count[22] << endl;
  cout << "x : " << count[23] << endl;
  cout << "y : " << count[24] << endl;
  cout << "z : " << count[25] << endl;

  return 0;
}


#include <bits/stdc++.h>
using namespace std;
char a;
int kotae[26], b;
int main(void) {
  while (1) {
    scanf(" %c", &a);
    if (a == '.')
      break;
    for (int j = 0; j < 26; j++) {
      if (a == 'a' + j || a == 'A' + j) {
        kotae[j] += 1;
      }
    }
  }
  for (int i = 0; i < 26; i++) {
    cout << (char)('a' + i) << " : " << kotae[i] << endl;
  }
}

#include <bits/stdc++.h>
using namespace std;
char a;
int kotae[26], b;
int main(void) {
  while (1) {
    if (scanf(" %c", &a) == EOF)
      break;
    for (int j = 0; j < 26; j++) {
      if (a == 'a' + j || a == 'A' + j) {
        kotae[j] += 1;
      }
    }
  }
  for (int i = 0; i < 26; i++) {
    cout << (char)('a' + i) << " : " << kotae[i] << endl;
  }
}


#include <iostream>
#include <stdio.h>
using namespace std;
int main() {

  int c[26] = {0};

  char ch;

  while (1) {

    scanf("%s", &ch);

    if (ch == '\\n')
      break;

    if (isalpha(ch)) {

      if (isupper(ch)) {

        ch = tolower(ch);

        int num = ch - 'a';

        c[num] += 1;

      } else {

        int num = ch - 'a';

        c[num] += 1;
      }
    }
  }

  for (int i = 0; i < 26; i++) {

    char alpha = i + 'a';

    cout << alpha << ' ' << ':' << ' ' << c[i] << endl;
  }

  return 0;
}

#include <iostream>
#include <stdio.h>
using namespace std;
int main() {

  int c[26] = {0};

  char ch;

  while (cin >> ch) {

    if (isalpha(ch)) {

      if (isupper(ch)) {

        char ch1 = tolower(ch);

        int num = ch1 - 'a';

        c[num] += 1;

      } else {

        int num = ch - 'a';

        c[num] += 1;
      }
    }
  }

  for (int i = 0; i < 26; i++) {

    char alpha = i + 'a';

    cout << alpha << ' ' << ':' << ' ' << c[i] << endl;
  }

  return 0;
}


#include <iostream>
using namespace std;
int main() {
  int counter[25];

  char ch;

  for (int x = 0; x <= 25; x++) {
    counter[x] = 0;
  }

  while (cin >> ch) {
    int num = ch - 'a';

    if (num >= 0 && num <= 25) {
      counter[num]++;
    }
  }

  for (int x = 0; x <= 25; x++) {
    char y = x + 'a';
    cout << y << ':';
    cout << counter[x] << endl;
  }

  return 0;
}

#include <iostream>
using namespace std;
int main() {
  int counter[26];

  char ch;

  for (int x = 0; x <= 25; x++) {
    counter[x] = 0;
  }

  while (cin >> ch) {
    if (isupper(ch)) {
      ch = tolower(ch);
    }
    int num = ch - 'a';

    if (num >= 0 && num <= 25) {
      counter[num]++;
    }
  }

  for (int x = 0; x <= 25; x++) {
    char y = x + 'a';
    cout << y << ' ' << ':' << ' ';
    cout << counter[x] << endl;
  }

  return 0;
}


#include <iostream>
#include <stdio.h>
using namespace std;

int main(void) {
  int count[26] = {0};

  while (1) {
    char c;
    if (c >= 65 && c <= 90)
      count[c - 'A']++;
    else if (c >= 97 && c <= 122)
      count[c - 'a']++;

    if (c == '.')
      break;
  }

  for (int i = 0; i < 26; i++)
    printf("%c : %d\\n", ('a' + i), count[i]);
  return 0;
}

#include <iostream>
#include <stdio.h>
using namespace std;

int main(void) {
  int count[26] = {0};
  char c;

  while (cin >> c) {

    if (c >= 65 && c <= 90)
      count[c - 'A']++;
    else if (c >= 97 && c <= 122)
      count[c - 'a']++;
  }

  for (int i = 0; i < 26; i++)
    printf("%c : %d\\n", ('a' + i), count[i]);
  return 0;
}


#include <iostream>
#include <string>
using namespace std;
int main() {
  string s;
  int z[26];
  for (int k = 0; k < 26; k++) {
    z[k] = 0;
  }
  while (1) {
    getline(cin, s);
    for (int i = 0; i < s.size(); i++) {
      if (s[i] >= 'a' && s[i] <= 'z')
        z[(int)s[i] - 'a']++;
      else if (s[i] >= 'A' && s[i] <= 'Z')
        z[(int)s[i] - 'A']++;
    }
    for (int j = 0; j < 26; j++) {
      cout << (char)(j + 97) << " : " << z[j] << endl;
    }
  }
  return 0;
}

#include <iostream>
#include <string>
using namespace std;
int main() {
  string s;
  int z[26];
  for (int k = 0; k < 26; k++) {
    z[k] = 0;
  }
  while (1) {
    getline(cin, s);
    if (s == "")
      break;
    for (int i = 0; i < s.size(); i++) {
      if (s[i] >= 'a' && s[i] <= 'z')
        z[(int)s[i] - 'a']++;
      else if (s[i] >= 'A' && s[i] <= 'Z')
        z[(int)s[i] - 'A']++;
    }
  }
  for (int j = 0; j < 26; j++) {
    cout << (char)(j + 97) << " : " << z[j] << endl;
  }
  return 0;
}


#include <ctype.h>
#include <stdio.h>
int main() {
  int c;
  int cnt[500] = {0};
  while (c != '.') {
    c = getchar();
    if (islower(c)) {
      cnt[c]++;
    } else {
      cnt[c + 32]++;
    }
  }
  for (c = 'a'; c <= 'z'; c++) {
    printf("%c : %d\\n", c, cnt[c]);
  }
  return 0;
}

#include <ctype.h>
#include <stdio.h>
int main() {
  int c;
  int cnt[500] = {0};
  while (c != EOF) {
    c = getchar();
    if (islower(c)) {
      cnt[c]++;
    } else {
      cnt[c + 32]++;
    }
  }
  for (c = 'a'; c <= 'z'; c++) {
    printf("%c : %d\\n", c, cnt[c]);
  }
  return 0;
}


#include <stdio.h>

int main() {
  int countTable[256] = {0};
  char current, history = 's';

  while ((current = getchar()) != '\\n' || history != '\\n') {
    countTable[current]++;
    history = current;
  }
  for (int i = 97; i <= 122; i++)
    printf("%c : %d\\n", i, countTable[i] + countTable[i - 32]);
}

#include <stdio.h>

int main() {
  int countTable[256] = {0};
  char ch;

  while ((ch = getchar()) != EOF) {
    countTable[ch]++;
  }
  for (int i = 97; i <= 122; i++)
    printf("%c : %d\\n", i, countTable[i] + countTable[i - 32]);
}


#include <cctype>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a.push_back(x);
  }

  for (int i = 0; i < a.size() - 1; i++) {
    for (int j = i + 1; j < a.size(); j++) {
      if (a[i] > a[j])
        swap(a[i], a[j]);
    }
  }
  for (int i = 0; i < a.size() - 1; i++)
    cout << a[i] << " ";
  cout << a[a.size() - 1] << endl;

  return 0;
}

#include <algorithm>
#include <cctype>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
  string r;
  int c;
  char ny;
  while (scanf("%c", &ny) != EOF) {

    // if(ny==EOF)break;
    r += ny;
  }
  char a = 'a';
  int count[26] = {0}; // aが0,zが25

  for (int i = 0; i < r.size(); i++) {
    for (int j = 0; j < 26; j++) {
      r[i] = tolower(r[i]);
      if (r[i] - 'a' == j)
        count[j]++;
    }
  }
  for (int i = 0; i < 26; i++) {
    printf("%c : %d\\n", a, count[i]);
    a++;
  }
  return 0;
}


#include <cctype>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  char ch;
  int num;
  int counter[26] = {};

  while (1) {
    scanf("%c", &ch);

    if (isalpha(ch)) {
      if (islower(ch)) {
        int num = ch - 'a';
        counter[num] += 1;
      }

      else if (isupper(ch)) {
        int num = ch - 'A';
        counter[num] += 1;
      }
    }

    if (ch == '.')
      break;
  }

  for (int i = 0; i < 26; i++) {
    ch = i + 'a';

    cout << ch << " "
         << ":"
         << " " << counter[i] << endl;
  }
}

#include <cctype>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  char ch;
  int num;
  int counter[26] = {};

  while (scanf("%c", &ch) != EOF) {

    if (isalpha(ch)) {
      if (islower(ch)) {
        int num = ch - 'a';
        counter[num] += 1;
      }

      else if (isupper(ch)) {
        int num = ch - 'A';
        counter[num] += 1;
      }
    }
  }

  for (int i = 0; i < 26; i++) {
    ch = i + 'a';

    cout << ch << " "
         << ":"
         << " " << counter[i] << endl;
  }
}


#include <iostream>
#include <string>
using namespace std;

int main() {
  int cnt[25] = {};
  char ch;

  while (cin >> ch) {
    ch = tolower(ch);
    if (isalpha(ch))
      cnt[ch - 'a']++;
  }

  for (int i = 0; i <= 25; i++) {
    cout << (char)(i + 'a') << " : " << cnt[i] << endl;
  }
  return 0;
}

#include <iostream>
#include <string>
using namespace std;

int main() {
  int cnt[26] = {};
  char ch;

  while (cin >> ch) {
    ch = tolower(ch);
    if (isalpha(ch))
      cnt[ch - 'a']++;
  }

  for (int i = 0; i <= 25; i++) {
    cout << (char)(i + 'a') << " : " << cnt[i] << endl;
  }
  return 0;
}


#include <ctype.h>
#include <stdio.h>
char c[1200];
int cnt[26];
int main() {
  char ch;
  int n;
  while (scanf("%s", c) != EOF) {
    for (int i = 0; c[i] != '\\0'; ++i) {
      ch = tolower(c[i]);
      n = ch - '0' - 49;
      ++cnt[n];
    }
  }
  for (int i = 0; i < 26; ++i)
    printf("%c : %d\\n", i + 97, cnt[i]);
  return 0;
}

#include <ctype.h>
#include <stdio.h>
char c[1200];
int cnt[27];
int main() {
  char ch;
  int n;
  while (scanf("%s", c) != EOF) {
    for (int i = 0; c[i] != '\\0'; ++i) {
      ch = tolower(c[i]);
      n = ch - '0';
      if (n < 49 || n > 74)
        continue;
      ++cnt[n - 49];
    }
  }
  for (int i = 0; i < 26; ++i)
    printf("%c : %d\\n", i + 97, cnt[i]);
  return 0;
}


*** stack smashing detected ***: terminated


#include <iostream>
#include <string>
#include <vector>

#define ALPHABET_NUM ('z' - 'a' + 1)
using namespace std;

int main(int argc, char *argv[]) {
  vector<int> num(ALPHABET_NUM, 0);

  while (true) {
    string str;
    getline(cin, str);
    for (string::iterator itr = str.begin(); itr != str.end(); itr++) {
      char c = *itr;
      if (!('A' <= c && c <= 'Z') && !('a' <= c && c <= 'z'))
        continue;
      if ('A' <= c && c <= 'Z')
        c += 'a' - 'A';
      num[c - 'a']++;
    }
  }

  for (int i = 0; i < num.size(); i++) {
    cout << (char)('a' + i) << " : " << num[i] << endl;
  }

  return 0;
}

#include <iostream>
#include <string>
#include <vector>

#define ALPHABET_NUM ('z' - 'a' + 1)
using namespace std;

int main(int argc, char *argv[]) {
  vector<int> num(ALPHABET_NUM, 0);

  char c;
  while (cin >> c) {
    if (!('A' <= c && c <= 'Z') && !('a' <= c && c <= 'z'))
      continue;
    if ('A' <= c && c <= 'Z')
      c += 'a' - 'A';
    num[c - 'a']++;
  }

  for (int i = 0; i < num.size(); i++) {
    cout << (char)('a' + i) << " : " << num[i] << endl;
  }

  return 0;
}


#include <stdio.h>
#include <string.h>

int main(void) {

  char search_word[12];
  char sentense[1001];
  char div_word[1001];
  char c;
  char *pst, *pend, *pnow;
  int cnt = 0;
  int ii;

  scanf("%s", search_word);
  scanf("%c", &c);
  for (ii = 0; ii < (int)strlen(search_word); ii++) {
    search_word[ii] &= 0xdf;
  }

  for (;;) {
    fgets(sentense, 1000, stdin);
    sentense[strlen(sentense) - 1] = '\\0';
    if (!strcmp(sentense, "END_OF_TEXT")) {
      break;
    }
    pst = pnow = sentense;
    do {
      pend = strstr(pst, " ");
      if (pend == NULL) {
        pend = &sentense[strlen(sentense)];
      }
      for (; pnow < pend; pnow++) {
        div_word[pnow - pst] = (*pnow) & 0xdf;
      }
      div_word[pnow - pst] = '\\0';
      if (!strcmp(div_word, search_word)) {
        cnt++;
      }
      pst = pnow = pend + 1;
    } while (pst < &sentense[strlen(sentense)]);
  }
  printf("%d\\n", cnt);
  // getchar();
  return 0;
}

#include <stdio.h>
#include <string.h>

// ?°????????????§????????????
void toUpper(char *str) {
  int len = strlen(str);
  if (len <= 0) {
    return;
  }
  for (int i = 0; i < len; i++) {
    if (str[i] >= 'a' && str[i] <= 'z') {
      str[i] &= 0xdf; //?°????????????§??????
    }
  }
}

int main(void) {

  char word[16];
  char sentense[1024];
  char t[1024];
  char tmp[16];

  int num[50];
  int combo[50];

  scanf("%s", word);
  toUpper(word);
  int cnt = 0;
  while (fgets(sentense, 1024, stdin) != NULL) {
    if (strcmp(sentense, "END_OF_TEXT\\n") == 0) {
      break;
    }
    toUpper(sentense);
    int len = strlen(sentense);
    if (len > 0) {
      sentense[len - 1] = '\\0';
    }
    char *ptr = strtok(sentense, " ");
    while (ptr != NULL) {
      if (strcmp(ptr, word) == 0) {
        cnt++;
      }
      ptr = strtok(NULL, " ");
    }
  }

  printf("%d\\n", cnt);

  return 0;
}


#include <iostream>
#include <stdio.h>
#include <string>

using namespace std;
int main() {
  string t, w;
  int c = 0, i;
  cin >> w;
  while (getline(cin, t) && (t != "END_OF_TEXT")) {
    i = 0;
    while (i <= t.length()) {
      int tm = t.find(w, i);
      if (tm != -1) {
        cout << tm << endl;
        c++;
        i += tm + w.length() - 1;
      }
    }
  }
  printf("%d", c);
  return 0;
}

#include <iostream>
#include <stdio.h>
#include <string>

using namespace std;
int main() {
  string t, w;
  int c = 0, i;
  size_t pos;
  cin >> w;
  while ((cin >> t) && (t != "END_OF_TEXT")) {
    for (int i = 0; i < t.length(); i++) {
      if (t[i] >= 'A' && t[i] <= 'Z')
        t[i] += 'a' - 'A';
    }
    pos = 0;
    if (t == w)
      c++;
  }
  printf("%d\\n", c);
  return 0;
}


#include <bits/stdc++.h>
using namespace std;

char tolower(char c);
int main() {
  int count;
  string W;
  cin >> W;
  while (1) {
    string str;
    if (str == "END")
      break;
    for (int i = 0; i < (int)str.size(); i++) {
      str[i] = tolower(str[i]);
    }
    if (str == W)
      count++;
  }
  cout << count << endl;
  return 0;
}

char tolower(char c) {
  if ('A' <= c && c <= 'Z') {
    return c - 'A' + 'Z';
  } else
    return c;
}

#include <bits/stdc++.h>
using namespace std;

char tolower(char c);
int main() {
  int count = 0;
  string W, str;
  cin >> W;
  while (1) {
    cin >> str;
    if (str == "END_OF_TEXT")
      break;
    for (int i = 0; i < (int)str.size(); i++) {
      str[i] = tolower(str[i]);
    }
    if (str == W)
      count++;
  }
  cout << count << endl;
  return 0;
}

char tolower(char c) {
  if ('A' <= c && c <= 'Z') {
    return c - 'A' + 'a';
  } else
    return c;
}


#include <iostream>
#include <string>

int main() {
  std::string word;
  std::string text;
  std::getline(std::cin, word);

  int cnt = 0;
  while (1) {
    std::getline(std::cin, text);
    if (text == "END_OF_TEXT")
      break;
    for (int i = 0; text[i] != '0'; ++i) {
      if (isupper(text[i]))
        text[i] = tolower(text[i]);
    }

    if (text == word)
      cnt++;
  }
  std::cout << cnt << std::endl;

  return 0;
}

#include <algorithm>
#include <iostream>
#include <string>

int main() {
  std::string word;
  std::cin >> word;
  std::transform(word.begin(), word.end(), word.begin(), ::tolower);

  int cnt = 0;
  std::string text;
  while (1) {
    std::cin >> text;
    if (text == "END_OF_TEXT")
      break;
    std::transform(text.begin(), text.end(), text.begin(), ::tolower);
    if (text == word)
      cnt++;
  }
  std::cout << cnt << std::endl;

  return 0;
}


#include <cctype>
#include <iostream>
#include <string>
using namespace std;

int main() {
  int a;
  string str1, str2;
  cin >> str2;

  while (1) {
    cin >> str1;

    for (int i = 0; i < str1.size(); i++)
      str1[i] = tolower(str1[i]);

    if (str1 == "END_OF_TEXT")
      break;
    if (str1 == str2)
      a++;
  }

  cout << a << endl;

  return 0;
}

#include <cctype>
#include <iostream>
#include <string>
using namespace std;

int main() {
  int a = 0; // a??????????????????????????????
  string str1, str2;
  cin >> str2;

  while (1) {
    cin >> str1;
    if (str1 == "END_OF_TEXT")
      break;
    for (int i = 0; i < str1.size(); i++)
      str1[i] = tolower(str1[i]);
    if (str1 == str2)
      a++;
  }

  cout << a << endl;

  return 0;
}


// class point	の練習（クラスの高度な実装）
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>

typedef long long llong;
using namespace std;

void lower(char *x) {
  for (int i = 0; x[i] != '\\0'; i++) {
    if (65 <= x[i] && x[i] <= 90)
      x[i] += 32;
  }
  return;
}

int main() {
  char W[20];
  char T[1100];
  char IPT[20];
  int Wlength;
  int cnt = 0;
  fgets(IPT, 20, stdin);
  strcpy(W, IPT);
  W[strlen(IPT) - 1] = '\\0';
  Wlength = strlen(W);
  while (1) {
    fgets(T, 1050, stdin);
    if (!strcmp(T, "END_OF_TEXT\\n"))
      break;
    lower(T);
    for (int i = 0; T[i] != '\\n'; i++) {
      if (T[i] == W[0]) {
        for (int j = 0; j < Wlength; j++) {
          if (T[i + j] != W[j])
            break;
          else if (j == Wlength - 1)
            cnt++;
        }
      }
    }
  }
  cout << cnt << '\\n';
  return 0;
}

// class point	の練習（クラスの高度な実装）
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>

typedef long long llong;
using namespace std;

void lower(char *x) {
  for (int i = 0; x[i] != '\\0'; i++) {
    if (65 <= x[i] && x[i] <= 90)
      x[i] += 32;
  }
  return;
}

int main() {
  char W[20];
  char T[1100];
  int cnt = 0;
  scanf("%s", W);
  while (1) {
    scanf("%s", T);
    if (!strcmp(T, "END_OF_TEXT"))
      break;
    lower(T);
    if (!strcmp(W, T))
      cnt++;
  }
  cout << cnt << '\\n';
  return 0;
}


#include <iostream>
#include <string>
using namespace std;
int main() {
  int result(0);
  string arg;
  cin >> arg;

  while (1) {
    string tmp;
    cin >> tmp;

    for (int i2(0), n2(tmp.length()); i2 < n2; ++i2) {
      if ('A' <= tmp[i2] && arg[i2] <= 'Z') {
        tmp[i2] = tmp[i2] - 'A' + 'a';
      }
    }

    if (tmp == "end_of_text") {
      cout << result; // << endl;
      return 0;
    }

    if (tmp == arg) {
      ++result;
    }
  }
}

#include <iostream>
#include <string>
using namespace std;
int main() {
  int result(0);
  string arg;
  cin >> arg;

  for (int i2(0), n2(arg.length()); i2 < n2; ++i2) {
    if ('A' <= arg[i2] && arg[i2] <= 'Z') {
      arg[i2] = arg[i2] - 'A' + 'a';
    }
  }

  while (1) {
    string tmp;
    cin >> tmp;

    if (tmp == "END_OF_TEXT") {
      cout << result << endl;
      return 0;
    }

    for (int i2(0), n2(tmp.length()); i2 < n2; ++i2) {
      if ('A' <= tmp[i2] && tmp[i2] <= 'Z') {
        tmp[i2] = tmp[i2] - 'A' + 'a';
      }
    }

    if (tmp == arg) {
      ++result;
    }
  }
}


#include <cctype>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;

int main() {
  int NUM = 1000;
  string W;
  string T[NUM];
  int count = 0;
  int length = 0;
  cin >> W;
  while (1) {
    for (int i = 0; i < NUM; i++) {
      cin >> T[i];
      if (T[i] == "END_OF_TEXT") {
        length = i;
        break;
      }
    }
  }

  for (int i = 0; i < NUM; i++) {
    if (T[i] == W)
      count++;
  }
  cout << count << endl;
  return 0;
}

#include <algorithm>
#include <cctype>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
using namespace std;

int main() {
  string W;
  string T;
  string END = "END_OF_TEXT";
  int count = 0;
  cin >> W;

  while (1) {
    cin >> T;

    if (T == END) {
      break;
    }

    // transform(T.begin(), T.end(), T.begin(), tolower);
    transform(T.begin(), T.end(), T.begin(), ::tolower);
    if (T == W) {
      count++;
    }
  }
  cout << count << endl;
  return 0;
}


#include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
using namespace std;

int main() {
  string p;
  string in;
  string s[10000] = {""};
  getline(cin, p);
  int n = 0;
  int k = 0;
  int q = 0;
  bool j = true;
  while (1) {
    getline(cin, in);
    for (int i = 0; i < in.length(); i++) {
      if (in[i] == 32) {
        k++;
      } else {
        s[k] += tolower(in[i]);
      }
    }
    for (; q <= k; q++) {
      string l = s[q];
      //  transform(s[q].begin(), s[q].end(), l.begin(), ::tolower
      //);
      if (s[q] == "END_OF_TEXT") {
        j = false;
      } else if (s[q] == p) {
        n++;
      }
    }
    k++;
    if (j == false)
      break;
  }
  cout << n << endl;
}

#include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
  string p;
  string in;
  string s[10000] = {""};
  getline(cin, p);
  int n = 0;
  int k = 0;
  int q = 0;
  bool j = true;
  while (1) {
    getline(cin, in);
    for (int i = 0; i < in.length(); i++) {
      if (in[i] == 32) {
        k++;
      } else {
        s[k] += in[i];
      }
    }
    for (; q <= k; q++) {
      if (s[q] == "END_OF_TEXT") {
        j = false;
      }
      string l = s[q];
      transform(l.begin(), l.end(), l.begin(), ::tolower);
      if (l == p) {
        n++;
      }
    }
    k++;
    if (j == false)
      break;
  }
  cout << n << endl;
}

terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create


#include <algorithm>
#include <iostream>
#include <istream>
#include <string.h>
#include <string>

using namespace std;

int main(void) {
  int count = 0;
  string t;
  string w;
  int position;
  int length_t, length_w;

  getline(cin, w);
  length_w = w.size();
  while (1) {
    position = 0;
    getline(cin, t);
    length_t = t.size();
    if (string(t).find("END_OF_TEXT") != string::npos) {
      break;
    }
    transform(t.begin(), t.end(), t.begin(), ::tolower);
    do {
      if (t.find(w, position) != string::npos) {
        position = (int)(t.find(w)) + 1;
        count++;
      } else {
        break;
      }
    } while (position <= length_t - length_w);
  }
  cout << count << endl;
  return 0;
}

#include <bits/stdc++.h>

#define FOR(i, a, b) for (long long int i = (a); i <= (b); i++)
#define RFOR(i, a, b) for (long long int i = (a); i >= (b); i--)
#define MOD 1000000007
#define INF 1000000000            // 2000000000
#define LLINF 1000000000000000000 // 9000000000000000000
#define PI 3.14159265358979

using namespace std;
typedef long long int ll;
typedef pair<long long int, long long int> P;

int main(void) {
  string s;
  string t;
  int count = 0;

  cin >> s;
  while (1) {
    cin >> t;
    if (t == "END_OF_TEXT") {
      break;
    } else {
      transform(t.begin(), t.end(), t.begin(), ::tolower);
      if (s == t) {
        count++;
      }
    }
  }

  cout << count << endl;

  return 0;
}


#include <iostream>
#include <string>

using namespace std;

int main() {
  string T;
  cin >> T;

  int ans = 0;
  while (true) {
    string W;
    cin >> W;
    if (W == "END_OF_TEXT") {
      break;
    }

    while (W.find(T) >= 0) {
      int pos = W.find(T) - 1;
      if (W[pos] == ' ') {
        ans++;
      }
    }
  }

  cout << ans << endl;

  return 0;
}

#include <cctype>
#include <iostream>
#include <string>

using namespace std;

int main() {
  string W;
  cin >> W;

  int ans = 0;
  while (1) {
    string T;
    cin >> T;
    if (T == "END_OF_TEXT") {
      break;
    }

    for (int i = 0; i < T.size(); i++) {
      T[i] = tolower(T[i]);
    }

    if (W == T) {
      ans++;
    }
  }

  cout << ans << endl;

  return 0;
}


#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;

int main() {
  string W, T;
  int cnt = 0;
  cin >> W;
  while (T != "END_OF_TEXT") {
    cin >> T;
    for (int i = 0; i < T.size(); i++) {
      if ('A' <= T[i] && T[i] <= 'Z') {
        T[i] += 34;
      }
    }
    if (W == T)
      cnt++;
  }
  cout << cnt << endl;
  return 0;
}

#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;

int main() {
  string W, T;
  int cnt = 0;
  cin >> W;
  while (true) {
    cin >> T;
    if (T == "END_OF_TEXT")
      break;
    for (int i = 0; i < T.size(); i++) {
      if ('A' <= T[i] && T[i] <= 'Z') {
        T[i] += 32;
      }
    }
    if (W == T)
      cnt++;
  }
  cout << cnt << endl;
  return 0;
}


#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) for (int i = (n)-1; (i) >= 0; --i)
#define SZ(n) (int)(n).size()
#define ALL(n) (n).begin(), (n).end()
#define MOD LL(1e9 + 7)
#define INF 1000000
using namespace std;
using LL = long long;

int main() {
  string w, t;
  cin >> w;
  int sum = 0;
  while (getline(cin, t)) {
    for (auto it = t.begin(); it != t.end() - w.size(); it++) {
      if (*it >= 'A' && *it <= 'Z')
        *it += 32;
      if (string(it, it + w.size()) == w)
        sum++;
    }
  }
  cout << sum << endl;
  return 0;
}

#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) for (int i = (n)-1; (i) >= 0; --i)
#define SZ(n) (int)(n).size()
#define ALL(n) (n).begin(), (n).end()
#define MOD LL(1e9 + 7)
#define INF 1000000
using namespace std;
using LL = long long;

int main() {
  string w, t;
  cin >> w;
  for (auto &e : w) {
    if (e >= 'A' && e <= 'Z')
      e += 32;
  }
  int sum = 0;
  while (cin >> t) {
    for (auto &e : t) {
      if (e >= 'A' && e <= 'Z')
        e += 32;
    }
    if (t == w)
      sum++;
  }
  cout << sum << endl;
  return 0;
}


#include <algorithm>
#include <cstdio>
#include <string>

using namespace std;

int main() {
  char buf[1 << 4];
  scanf("%s", buf);
  string W(buf);
  transform(W.begin(), W.end(), W.begin(), [](char c) { return c |= 0x20; });

  int res = 0;
  string T;
  for (char c; scanf("%c", &c) != EOF;) {
    if (((c | 0x20) >= 'a' && (c | 0x20) <= 'z') || c == '-' || c == '_') {
      T += c;
      continue;
    }

    if (T == "END_OF_TEXT")
      break;
    if (!T.length())
      continue;

    transform(T.begin(), T.end(), T.begin(), [](char c) { return c |= 0x20; });

    fprintf(stderr, "%s\\n", T.c_str());

    if (W == T)
      ++res;

    T = "";
  }

  printf("%d\\n", res);
  return 0;
}

#include <algorithm>
#include <cstdio>
#include <string>

using namespace std;

int main() {
  char buf[1 << 11];
  scanf("%s", buf);
  string W(buf);
  transform(W.begin(), W.end(), W.begin(),
            [](char c) -> char { return c |= 0x20; });

  int res = 0;
  string T;
  for (char c; scanf("%c", &c) != EOF;) {
    if (((c | 0x20) >= 'a' && (c | 0x20) <= 'z') || c == '-' || c == '_') {
      T += c;
      continue;
    }

    if (T == "END_OF_TEXT")
      break;
    if (!T.length())
      continue;

    transform(T.begin(), T.end(), T.begin(),
              [](char c) -> char { return c |= 0x20; });

    if (W == T)
      ++res;

    T = "";
  }

  printf("%d\\n", res);
  return 0;
}

nurtures
computer
scientists
and
highly-skilled
computer
engineers
who
will
create
and
exploit
knowledge
for
the
new
era
provides
an
outstanding
computer
environment


#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef pair<ll, ll> P;
typedef vector<P> vp;
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define REPR(i, n) for (int i = n - 1; i >= 0; i--)
#define FORR(i, n, m) for (int i = n - 1; i >= m; i--)
#define all(in) in.begin(), in.end()
#define ALL(in, K) in, in + K
#define INF 100000000
#define MOD 100000007
#define SIZE 100005
#define pi 3.14159265358979323846

int main() {
  ll ans = 0;
  string w;
  cin >> w;
  REP(i, w.size()) {
    if (65 < w[i] && w[i] < 91) {
      w[i] += 32;
    }
  }
  while (1) {
    string s;
    cin >> s;
    if (s.size() == w.size()) {
      REP(i, s.size()) {
        if (65 < s[i] && s[i] < 91) {
          s[i] += 32;
        }
      }
      if (s == "END_OF_TEXT") {
        cout << ans << endl;
        return 0;
      }
      if (s == w) {
        ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}

#include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef pair<ll, ll> P;
typedef vector<P> vp;
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define REPR(i, n) for (int i = n - 1; i >= 0; i--)
#define FORR(i, n, m) for (int i = n - 1; i >= m; i--)
#define all(in) in.begin(), in.end()
#define ALL(in, K) in, in + K
#define INF 100000000
#define MOD 100000007
#define SIZE 100005
#define pi 3.14159265358979323846

int main() {
  ll ans = 0;
  string w;
  cin >> w;
  REP(i, w.size()) {
    if (65 < w[i] && w[i] < 91) {
      w[i] += 32;
    }
  }
  while (1) {
    string s;
    cin >> s;
    if (s == "END_OF_TEXT") {
      cout << ans << endl;
      return 0;
    }
    if (s.size() == w.size()) {
      REP(i, s.size()) {
        if (64 < s[i] && s[i] < 91) {
          s[i] += 32;
        }
      }
      // cout << s << endl;
      if (s == w) {
        ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}


#include <iostream>
#include <string>
using namespace std;

int main() {
  string w, t;
  int counter = 0;
  cin >> w;
  for (int i = 0; w[i] != w.length(); i++) {
    if (islower(w[i]))
      w[i] = toupper(w[i]);
  }
  while (1) {
    cin >> t;
    if (t == "END_OF_TEXT") {
      cout << counter << endl;
      break;
    }
    for (int i = 0; i < t.length(); i++) {
      if (islower(t[i]))
        t[i] = toupper(t[i]);
    }
    if (t == w)
      counter++;
  }

  return 0;
}

#include <iostream>
#include <string>
using namespace std;

int main() {
  string w, t;
  int counter = 0;
  cin >> w;
  for (int i = 0; i < w.length(); i++) {
    if (islower(w[i]))
      w[i] = toupper(w[i]);
  }
  while (cin >> t) {
    if (t == "END_OF_TEXT") {
      cout << counter << endl;
      break;
    }
    for (int i = 0; i < t.length(); i++) {
      if (islower(t[i]))
        t[i] = toupper(t[i]);
    }
    if (t == w)
      counter++;
  }

  return 0;
}


#include <iostream>
using namespace std;
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NUM 200

int main() {
  static long i, j, k, l;
  static char p[1005];
  static char s[13];
  static char ch;
  static int sum[26];
  static char r[12] = "END_OF_TEXT";
  int cnt = 0;
  char ok;
  char end = 0;
  FILE *fp;
  fp = fopen("in3.txt", "r");
  fgets(s, 13, stdin);

  while (end == 0) {
    fgets(p, 1010, stdin);
    for (i = 0; p[i]; i++) {
      if ('a' <= p[i] && p[i] <= 'z' || 'A' <= p[i] && p[i] <= 'Z') {
        if (p[i] == r[0]) {
          end = 1;
          for (j = 0; r[j]; j++) {
            if (p[i + j] != r[j]) {
              end = 0;
              break;
            }
          }
          if (end)
            break;
        }
        if (tolower(p[i]) == tolower(s[0])) {
          ok = 1;
          j = i;
          for (; s[i - j] != '\\n'; i++) {
            if (tolower(p[i]) != tolower(s[i - j])) {
              ok = 0;
              i--;
              break;
            }
          }
          if (ok) {
            cnt++;
            i--;
          }
        }
      }
      for (;; i++) {
        if ('a' <= p[i] && p[i] <= 'z' || 'A' <= p[i] && p[i] <= 'Z')
          ;
        else
          break;
      }
    }
  }
  fclose(fp);
  cout << cnt;
  cout << endl;

  return 0;
}

#include <iostream>
using namespace std;
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define NUM 200

int main() {
  static long i, j, k, l;
  static char p[1005];
  static char s[13];
  static char ch;
  static int sum[26];
  static char r[12] = "END_OF_TEXT";
  int cnt = 0;
  char ok;
  char end = 0;
  fgets(s, 13, stdin);

  while (end == 0) {
    fgets(p, 1010, stdin);
    for (i = 0; p[i]; i++) {
      if ('a' <= p[i] && p[i] <= 'z' || 'A' <= p[i] && p[i] <= 'Z') {
        if (p[i] == r[0]) {
          end = 1;
          for (j = 0; r[j]; j++) {
            if (p[i + j] != r[j]) {
              end = 0;
              break;
            }
          }
          if (end)
            break;
        }
        if (tolower(p[i]) == tolower(s[0])) {
          ok = 1;
          j = i;
          for (; s[i - j] != '\\n'; i++) {
            if (tolower(p[i]) != tolower(s[i - j])) {
              ok = 0;
              i--;
              break;
            }
          }
          if ('a' <= p[i] && p[i] <= 'z' || 'A' <= p[i] && p[i] <= 'Z')
            ok = 0;

          if (ok) {
            cnt++;
            i--;
          }
        }
      }
      for (;; i++) {
        if ('a' <= p[i] && p[i] <= 'z' || 'A' <= p[i] && p[i] <= 'Z')
          ;
        else
          break;
      }
    }
  }
  cout << cnt;
  cout << endl;

  return 0;
}


#include <iostream>
#include <string>
using namespace std;
int main() {
  string w;
  string t;
  cin >> w;
  int i;
  for (i = 0; i < w.size(); i++) {
    if ('A' <= w[i] && w[i] <= 'Z') {
      w[i] += 'a' - 'A';
    }
  }
  int o = 0;
  cin >> t;
  while (t != "END_OF_TEXT") {
    for (i = 0; i < t.size(); i++) {
      if ('A' <= t[i] && t[i] <= 'Z') {
        t[i] += 'a' - 'A';
      }
    }
    if (w == t) {
      o++;
      cin >> t;
    }
  }
  cout << o << endl;
}

#include <iostream>
#include <string>
using namespace std;
int main() {
  string w;
  string t;
  cin >> w;
  int i;
  for (i = 0; i < w.size(); i++) {
    if ('A' <= w[i] && w[i] <= 'Z') {
      w[i] += 'a' - 'A';
    }
  }
  int o = 0;
  cin >> t;
  while (t != "END_OF_TEXT") {
    for (i = 0; i < t.size(); i++) {
      if ('A' <= t[i] && t[i] <= 'Z') {
        t[i] += 'a' - 'A';
      }
    }
    if (w == t) {
      o++;
      // cin >> t;
    }
    cin >> t;
  }
  cout << o << endl;
}


#include <iostream>
#include <string>
using namespace std;
int main() {
  int count = 0;
  string word, the;
  cin >> the;
  while (1) {
    cin >> word;
    for (int i = 0; i < sizeof(word); i++) {
      word[i] = tolower(word[i]);
    }
    if (word == "END_OF_TEXT")
      break;
    else if (word == the) {
      count++;
    }
  }
  cout << count << endl;
  return 0;
}

#include <iostream>
#include <string>
using namespace std;
int main() {
  int count = 0;
  string word, the;
  cin >> the;
  while (1) {
    cin >> word;
    if (word == "END_OF_TEXT")
      break;
    for (int i = 0; i < sizeof(word); i++) {
      word[i] = tolower(word[i]);
    }
    if (word == the)
      count++;
  }
  cout << count << endl;
  return 0;
}


#include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
using namespace std;

int main() {
  string w;
  string t;
  int i;
  int count;
  char w2;

  cin >> w;

  for (i = 0; w[i] != '\\0'; i++) {
    w[i] = static_cast<char>(tolower(w[i]));
  }

  cout << w << "\\n";
  while (1) {
    cin >> t;

    for (i = 0; t[i] != '\\0'; i++) {
      t[i] = static_cast<char>(tolower(t[i]));
    }
    cout << t << "\\n";
    if (t == w) {
      count++;
    }

    if (t == "END_OF_TEXT")
      break;
  }

  cout << count << "\\n";
}

#include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
using namespace std;

int main() {
  string w;
  string t;
  int i;
  int count = 0;

  cin >> w;

  for (i = 0; w[i] != '\\0'; i++) {
    w[i] = static_cast<char>(toupper(w[i]));
  }

  while (cin >> t) {
    // cin >> t;
    if (t == "END_OF_TEXT")
      break;

    for (i = 0; t[i] != '\\0'; i++) {
      t[i] = static_cast<char>(toupper(t[i]));
    }

    if (t == w) {
      count++;
    }
  }

  cout << count << "\\n";
}


#include <bits/stdc++.h>
using namespace std;
char tolower(char ch) {
  if ('A' <= ch && ch && ch <= 'Z') {
    return ch - 'A' + 'a';
  } else {
    return ch;
  }
}
int main() {
  int count = 0;
  string W;
  cin >> W;
  string str;
  while (1) {
    cin >> str;
    if (str == "END_PF_TEXT")
      break;
    for (int i = 0; i < (int)str.size(); i++) {
      str[i] = tolower(str[i]);
    }
    if (str == W) {
      count++;
    }
  }
  cout << count << endl;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
char tolower(char ch) {
  if ('A' <= ch && ch && ch <= 'Z') {
    return ch - 'A' + 'a';
  } else {
    return ch;
  }
}
int main() {
  int count = 0;
  string W;
  cin >> W;
  string str;
  while (1) {
    cin >> str;
    if (str == "END_OF_TEXT")
      break;
    for (int i = 0; i < (int)str.size(); i++) {
      str[i] = tolower(str[i]);
    }
    if (str == W) {
      count++;
    }
  }
  cout << count << endl;
  return 0;
}


#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
  string Word;
  string Sentence;
  int Count = 0;
  vector<int> Judge(1000, 1);

  cin >> Word;
  while (getline(cin, Sentence)) {
    if (Sentence == "END_OF_TEXT")
      break;
    for (int i = 0; i <= Sentence.size() - Word.size(); i++) {
      for (int j = 0; j < Word.size(); j++) {
        if (Word[j] != Sentence[i + j])
          Judge[i] = 0;
      }
      if (Judge[i] == 1)
        Count++;
    }
  }
  cout << Count << endl;

  return 0;
}

#include <iostream>
#include <string>
#include <vector>
using namespace std;

string Transition(string Word) {
  for (int i = 0; i < Word.size(); i++) {
    if ('a' <= Word[i] && Word[i] <= 'z')
      Word[i] += 'A' - 'a';
  }
  return Word;
}

vector<string> ReadWords(vector<string> Sentence) {
  //	?????????????????????????????????END_OF_TEXT??§???????????°??§???????????´?????????????????????????????????
  while (1) {
    string Go;
    cin >> Go;
    if (Go == "END_OF_TEXT")
      break;
    for (int i = 0; i < Go.size(); i++) {
      if ('a' <= Go[i] && Go[i] <= 'z')
        Go[i] += 'A' - 'a';
    }
    Sentence.push_back(Go);
  }
  return Sentence;
}

int Count(string Word, vector<string> Sentence) {
  //	?????????????????????????????????????????????????????°?????????
  int C = 0;
  for (int i = 0; i < Sentence.size(); i++) {
    if (Sentence[i] == Word)
      C++;
  }
  return C;
}

int main() {
  //	??????????????????????????§???????????´??????
  string Word;
  cin >> Word;
  Word = Transition(Word);
  //	????????????????????????
  vector<string> Sentence;
  Sentence = ReadWords(Sentence);
  //	for(int i = 0; i < Sentence.size(); i++){
  //		cout << Sentence[i];
  //	}
  //	?????????????????????????????????????????°??????????????????
  int X = Count(Word, Sentence);
  cout << X << endl;

  //	system("pause");
  return 0;
}


#include <iostream>
#include <string>

using namespace std;

int main() {
  string T, S;
  int count = 0, i;
  cin >> S;
  while (T != "END_OF_TEXT") {
    cin >> T;
    for (i = 0; i < T.size(); i++) {
      if (T[i] >= 'A' && T[i] <= 'Z')
        T[i] += 32;
    }
    if (T == S)
      count++;
  }
  cout << count << endl;
}

#include <iostream>
#include <string>

using namespace std;

int main() {
  string T, S;
  int count = 0, i;
  cin >> S;
  while (cin >> T, T != "END_OF_TEXT") {
    for (i = 0; i < T.size(); i++) {
      if (T[i] >= 'A' && T[i] <= 'Z')
        T[i] += 32;
    }
    if (T == S)
      count++;
  }
  cout << count << endl;
}


#include <bits/stdc++.h>
using namespace std;
string f(string x) {
  for (int i = 0; i < x.size(); i++) {
    if (x[i] <= 'Z' and x[i] >= 'A') {
      x[i] = x[i + 32];
    }
  }
  return x;
}
int main() {
  freopen("input.txt", "r", stdin);
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string a;
  cin >> a;
  string d = f(a);
  map<string, int> m;
  string b;
  while (cin >> b) {
    string c = f(b);
    m[c]++;
  }
  map<string, int>::iterator it;
  for (it = m.begin(); it != m.end(); it++) {
    cout << m[a];
    return 0;
  }
}

#include <bits/stdc++.h>
using namespace std;
int main() {
  string p[1000];
  int i, j, k;
  string W, T, line;
  cin >> W;
  while (getline(cin, T)) {
    if (T == "END_OF_TEXT")
      break;

    line = line + T + " ";
  }
  transform(W.begin(), W.end(), W.begin(), ::tolower);
  transform(line.begin(), line.end(), line.begin(), ::tolower);
  k = 0;
  for (i = 0; i < line.size(); i++) {
    if (line[i] >= 'a' && line[i] <= 'z') {
      string s;
      for (j = i;; j++) {
        if (isspace(line[j])) {
          i = j--;
          break;
        } else {
          s.push_back(line[j]);
        }
      }
      p[k] = s;
      k++;
    }
  }
  int c = 0;
  for (int i = 0; i < 1000; i++)
    if (p[i] == W)
      c++;

  cout << c << endl;
}


#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <locale.h>
#include <map>
#include <set>
#include <string>
#include <vector>

#define all(x) x.begin(), x.end()
#define sz(x) (int)(x.size())
#define pb push_back
#define mp make_pair
#define endl "\\n"
#define rep(i, x, y) for (int i = x; i <= y; ++i)
#define repr(i, x, y) for (int i = x; i >= y; --i)
#define y1 wearsdfasdf
#define fi first
#define se second

typedef long long ll;

const int N = (int)(5e5) + 322;
const ll INF = (ll)(1e9) + 7;
const double eps = (1e-9);

using namespace std;

int main() {
  string s;
  cin >> s;
  rep(i, 0, sz(s) - 1) { s[i] = tolower(s[i]); }
  string t;
  int cnt = 0;
  while (true) {
    string cur;
    cin >> cur;
    rep(i, 0, sz(cur) - 1) { cur[i] = tolower(cur[i]); }
    if (cur == "END_OF_TEXT")
      break;
    if (cur == s)
      cnt++;
  }
  cout << cnt;
  return 0;
}

#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <vector>

using namespace std;
int main() {

  string s, S;
  int cnt = 0;
  getline(cin, s);
  for (int i = 0; i < s.size(); i++) {
    s[i] = tolower(s[i]);
  }
  while (getline(cin, S) && S != "END_OF_TEXT") {
    stringstream ss;
    ss << S;
    string w;
    while (ss >> w) {
      for (int i = 0; i < w.size(); i++) {
        w[i] = tolower(w[i]);
      }
      if (w == s) {
        cnt++;
      }
    }
  }
  cout << cnt << endl;
  return 0;
}


#include <iostream>
#include <string>
using namespace std;
int main(void) {
  string w;
  string t;
  int count = 0;

  cin >> w;
  for (int i = 0; w.size(); i++) {
    if ('A' <= w[i] && w[i] <= 'Z')
      w[i] += 'a' - 'A';
  }

  cin >> t;
  while (t != "END_OF_TEXT") {
    for (int i = 0; i < t.size(); i++) {
      if ('A' <= w[i] && w[i] <= 'Z')
        t[i] += 'a' - 'A';
    }
    if (w == t)
      count++;
  }
  cout << count << endl;
  cin >> t;

  return 0;
}

#include <iostream>
#include <string>
using namespace std;
int main(void) {
  string w;
  string t;
  int count = 0;

  cin >> w;
  for (int i = 0; i < w.size(); i++) {
    if ('A' <= w[i] && w[i] <= 'Z')
      w[i] += 'a' - 'A';
  }

  cin >> t;
  while (t != "END_OF_TEXT") {
    for (int i = 0; i < t.size(); i++) {
      if ('A' <= t[i] && t[i] <= 'Z')
        t[i] += 'a' - 'A';
    }
    if (w == t)
      count++;
    cin >> t;
  }
  cout << count << endl;
}


#include <iostream>
#include <string>
using namespace std;

bool icompare_pred(unsigned char a, unsigned char b) {
  return tolower(a) == tolower(b);
}

bool icompare(string const &a, string const &b) {
  if (a.length() == b.length())
    return equal(b.begin(), b.end(), a.begin(), icompare_pred);
  else
    return false;
}

int main() {
  string word;
  cin >> word;
  string s;
  int cnt = 0;

  while (!icompare(s, "END_OF_TEXT")) {
    cin >> s;
    if (icompare(s, word))
      cnt++;
  }
  cout << cnt << endl;
  return 1;
}

#include <ctype.h>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>

using namespace std;
string str, str2;
int main() {
  int count = 0;
  std::cin >> str2;
  for (int i = 0; i < str2.size(); i++)
    str2[i] = tolower(str2[i]);

  while (std::cin.eof() == false) {
    std::cin >> str;
    if (str == "END_OF_TEXT")
      break;
    for (int i = 0; i < str.size(); i++) {
      str[i] = tolower(str[i]);
    }
    if (str2 == str)
      count++;
  }
  std::cout << count << "\\n";
}


#include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;

#define ll long long
#define vvi vector<vector<int>>
#define vi vector<int>
#define All(X) X.begin(), X.end()
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define pb push_back
#define pii pair<int, int>
#define mp make_pair
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

string upper(string str) {
  for (int i = 0; i < str.size(); i++) {
    if ('a' <= str[i] && str[i] <= 'z') {
      str[i] = (str[i] - 'a' + 'A');
    }
  }
  return str;
}

int main() {
  string W;
  string S, T = "";
  int j, b = 0;
  cin >> W;
  do {
    S += T;
    getline(cin, T);
  } while (T != "END_OF_TEXT");
  REP(i, S.size()) {
    if (S[i] == W[j]) {
      j = j + 1;
    } else {
      j = 0;
    }
    if (W.size() == j) {
      b = b + 1;
    }
  }
  cout << b << endl;
  return 0;
}

#include <algorithm>
#include <cmath>
#include <complex>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;

#define ll long long
#define vvi vector<vector<int>>
#define vi vector<int>
#define All(X) X.begin(), X.end()
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define pb push_back
#define pii pair<int, int>
#define mp make_pair
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

string upper(string str) {
  for (int i = 0; i < str.size(); i++) {
    if ('a' <= str[i] && str[i] <= 'z') {
      str[i] = (str[i] - 'a' + 'A');
    }
  }
  return str;
}

int main() {
  string W = "";
  string S = "";
  string T = "";
  int j = 0;
  int b = 0;
  int i = 0;
  cin >> W;
  getline(cin, T);
  do {
    S += T;
    getline(cin, T);
    T += " ";
  } while (T != "END_OF_TEXT ");
  T = "";
  S = upper(S);
  W = upper(W);
  while (i < S.size()) {
    while (S[i] != ' ') {
      T += S[i];
      i++;
    }
    if (T == W) {
      b++;
    }
    T = "";
    i++;
  }
  cout << b << endl;
  return 0;
}


#include <algorithm>
#include <cctype>
#include <cstdio>
#include <iostream>
#include <stack>
#include <string>
#include <vector>

#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define llong long long
#define INF 999999999
#define pb(a) push_back(a)

using namespace std;

vector<string> split(string str, char delim) {
  vector<string> res;
  size_t current = 0, found;
  while ((found = str.find_first_of(delim, current)) != string::npos) {
    string tmp = string(str, current, found - current);
    res.push_back(tmp);
    current = found + 1;
  }
  string tmp = string(str, current, found - current);
  tmp.replace(tmp.size() - 1, tmp.size(), "\\0");
  res.push_back(string(str, current, str.size() - current));
  return res;
}

char *StrToUpper(char *s) {
  char *p;
  for (p = s; *p; p++) {
    *p = toupper(*p);
  }
  return s;
}

int main() {
  char cword[11];
  cin >> cword;

  int cnt = 0;

  while (1) {
    char cstr[1001];
    cin >> cstr;

    if (string(cstr).find("END_OF_TEXT") != string::npos)
      break;

    string word = StrToUpper(cword);
    vector<string> vec = split(StrToUpper(cstr), ' ');
    // transform(word.begin(), word.end(), word.begin(), toupper);
    // transform(str.begin(), str.end(), str.begin(), toupper);
    int num = 0;

    for (int i = 0; i < vec.size(); i++) {
      if (vec[i] == word)
        cnt++;
    }
  }

  printf("%d\\n", cnt);

  while (1) {
  }
}

#include <algorithm>
#include <cctype>
#include <cstdio>
#include <iostream>
#include <stack>
#include <string>
#include <vector>

#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define llong long long
#define INF 999999999
#define pb(a) push_back(a)

using namespace std;

vector<string> split(string str, char delim) {
  vector<string> res;
  size_t current = 0, found;
  while ((found = str.find_first_of(delim, current)) != string::npos) {
    string tmp = string(str, current, found - current);
    res.push_back(tmp);
    current = found + 1;
  }
  string tmp = string(str, current, found - current);
  tmp.replace(tmp.size() - 1, tmp.size(), "\\0");
  res.push_back(string(str, current, str.size() - current));
  return res;
}

char *StrToUpper(char *s) {
  char *p;
  for (p = s; *p; p++) {
    *p = toupper(*p);
  }
  return s;
}

int main() {
  char cword[11];
  cin >> cword;

  int cnt = 0;

  while (1) {
    char cstr[1001];
    cin >> cstr;

    if (string(cstr).find("END_OF_TEXT") != string::npos)
      break;

    string word = StrToUpper(cword);
    vector<string> vec = split(StrToUpper(cstr), ' ');
    // transform(word.begin(), word.end(), word.begin(), toupper);
    // transform(str.begin(), str.end(), str.begin(), toupper);
    int num = 0;

    for (int i = 0; i < vec.size(); i++) {
      if (vec[i] == word)
        cnt++;
    }
  }

  printf("%d\\n", cnt);
}


#include <cstdio>
#include <iostream>
int main() {
  int i = 0, j = 0, k, num, num2, count = 0;
  char text[1001];
  char word[11];
  char tmp = 1;
  while (scanf("%c", &tmp) != '\\n') {
    word[j] = tmp;
    j++;
  }
  num2 = j - 1;
  while (scanf("%c", &tmp) != EOF) {
    text[i] = tmp;
    i++;
  }
  num = i - 12;
  for (i = 0; i < num; i++) {
    for (j = 0, k = i; j < num2; j++, k++) {
      if (word[j] != text[k])
        break;
      if (j == num2 - 1) {
        count += 1;
      }
    }
  }
  std::cout << count << std::endl;
  return 0;
}

#include <algorithm>
#include <iostream>
#include <string.h>
using namespace std;

int main() {
  int judge, count = 0;
  char str[1001];
  string word;
  string text;
  string eot = "END_OF_TEXT";

  cin >> word;
  transform(word.begin(), word.end(), word.begin(), ::tolower);
  while (1) {
    cin >> text;
    if (text == eot)
      break;
    // if ( 0== (judge=stricmp( word.c_str() , text.c_str()))) count+=1;
    transform(text.begin(), text.end(), text.begin(), ::tolower);
    if (word == text)
      count += 1;
  }
  cout << count << endl;
  return 0;
}


#include <iostream>
#include <string>
using namespace std;

string low(string w) {
  string w_ = "";
  for (int i = 0; i < w.size(); i++) {
    if (w[i] >= 'A' && w[i] <= 'Z') {
      w_ += w[i] + 32;
    } else {
      w_ += w[i];
    }
  }
  return w_;
}

int main() {
  string w;
  string t;
  int cnt = 0;
  cin >> w;
  w = low(w);

  while (true) {
    cin >> t;
    if (t == "END_OF_TEXT")
      break;
    t = low(t);
    for (int i = 0; i < t.size() - w.size() + 1; i++) {
      if (t.substr(i, w.size()) == w) {
        cnt++;
        // cout << t.substr(i, w.size()) << endl;
      }
    }
    // cout << cnt << endl;
  }
  cout << cnt << endl;
  return 0;
}

#include <iostream>
#include <string>
using namespace std;

string low(string w) {
  string w_ = "";
  for (int i = 0; i < w.size(); i++) {
    if (w[i] >= 'A' && w[i] <= 'Z') {
      w_ += w[i] + 32;
    } else {
      w_ += w[i];
    }
  }
  return w_;
}

int main() {
  string w;
  cin >> w;
  string t;
  string tmp = "";
  int cnt = 0;
  int line = 0;
  w = low(w);

  string tango = "";

  while (true) {
    getline(cin, t);
    if (t == "END_OF_TEXT") {
      if (tango == w) {
        cnt += 1;
      }
      break;
    }
    t = low(t);

    // for(int i=0;i<t.size();i++){
    //     if(i==0){
    //         if(tmp==w){
    //             cnt++;
    //         }
    //         tmp="";
    //     }

    //     if(t[i]!=' '){
    //         tmp += t[i];
    //     }else{
    //         if(tmp==w){
    //             cnt++;
    //         }
    //         tmp="";
    //     }
    // }
    for (int i = 0; i < t.size(); i++) {
      if (i == 0) {
        if (tango == w) {
          cnt += 1;
        }
        tango = "";
      }

      if (t[i] != ' ') {
        tango += t[i];
      } else {
        if (tango == w) {
          cnt += 1;
        }
        tango = "";
      }
    }
    // cout << cnt<< endl;
  }

  cout << cnt << endl;
  return 0;
}

terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr: __pos (which is 4) > this->size() (which is 3)