分别按位取余
#include<bits/stdc++.h>
//#include <iostream>
//#pragma GCC optimize(2)
using namespace std;
#define maxn 100005
#define inf 1e18
typedef long long ll;
const ll mod = 1e9+7;
char str[maxn];
ll ans = 0;
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
cin >> str;
for(ll i = 0; i < strlen(str); i++)
{
ans = ans*10 + (str[i]-'0');
ans = ans % mod;
}
cout << ans << endl;
return 0;
}