#include <bits/stdc++.h>
using namespace std;
long long gcd(long long aaa, long long bbb) {
  if (bbb == 0) {
    return aaa;
  }
  return gcd(bbb, aaa % bbb);
}
int main() {
  long long int a, b, c, d, e;
  cin >> a >> b >> c;
  d = a * b % 1000000007;
  e = d * c % 1000000007;
  cout << e << endl;
}
