#include <bits/stdc++.h>
using namespace std;
bool mod[10000];
void find(int X) {
  int m = 2;
  for (m = 2;; m++) {
    if (X == 1) break;
    if (X % m == 0) {
      mod[m] = 1;
      X /= m;
      m = 1;
    }
  }
}
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  fill(mod, mod + 10000, 0);
  if (a == 1 && b == 1 && c == 1) mod[1] = 1;
  find(a);
  find(b);
  find(c);
  b = 0;
  for (a = 0; a < 10000; a++) {
    if (mod[a] == 1) b++;
  }
  cout << b << endl;
  return 0;
}
