#include int main() { int n, i; long long ans=0, t; scanf("%d", &n); for (i=0; i